general review
This commit is contained in:
parent
48be8dd112
commit
f806bc35f5
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "at"
|
title: "at"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
Install with:
|
Install with:
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "basics"
|
title: "Basics"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
You need about a dozen commands to move around Linux.
|
You need about a dozen commands to move around Linux.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "clock"
|
title: "clock"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
Show system time:
|
Show system time:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "conditionals"
|
title: "conditionals"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
# If statements
|
# If statements
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "cron"
|
title: "cron"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
# Cron
|
# Cron
|
||||||
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: "kernel"
|
title: "kernel"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
# Living Space
|
## Living Space
|
||||||
|
|
||||||
Kernel modules live in lib/modules/$(uname -r)
|
Kernel modules live in lib/modules/$(uname -r)
|
||||||
|
|
||||||
|
## Change
|
||||||
|
|
||||||
Load them with
|
Load them with
|
||||||
|
|
||||||
> sudo modprobe ath9k
|
> sudo modprobe ath9k
|
||||||
@ -16,5 +18,9 @@ Or remove one with
|
|||||||
|
|
||||||
The PC's irritating speaker beep can be really annoying. Disable it with:
|
The PC's irritating speaker beep can be really annoying. Disable it with:
|
||||||
|
|
||||||
> sudo rmmod pcspeaker
|
> sudo modprobe -r pcspeaker
|
||||||
|
|
||||||
|
Permanently disable a module by blacklisting it in `/etc/modprobe.d`:
|
||||||
|
|
||||||
|
> echo 'blacklist pcspkr' > /etc/modprobe.d/*nobeep*.conf
|
||||||
|
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
---
|
---
|
||||||
title: "kill"
|
title: "kill"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
If you want to kill a program in a graphical environment, open a terminal and typeL
|
|
||||||
|
|
||||||
## Graphical Programs
|
If you want to kill a program in a graphical environment, open a terminal and type:
|
||||||
|
|
||||||
|
# Graphical Programs
|
||||||
|
|
||||||
> xkill
|
> xkill
|
||||||
|
|
||||||
Then click on the application which you want to kill.
|
Then click on the application which you want to kill.
|
||||||
|
|
||||||
## All Programs
|
# All Programs
|
||||||
|
|
||||||
To kill a program, find it with:
|
To kill a program, find it with:
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ Kill the program with:
|
|||||||
|
|
||||||
> kill 19643
|
> kill 19643
|
||||||
|
|
||||||
## Types of Kill
|
# Types of Kill
|
||||||
|
|
||||||
To see an ordered list of termination signals:
|
To see an ordered list of termination signals:
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
---
|
---
|
||||||
title: "links"
|
title: "links"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
Link from X to Y.
|
Link from X to Y.
|
||||||
|
|
||||||
> ln -s X ../otherdir/Y
|
> ln -s X ../otherdir/Y
|
||||||
|
|
||||||
Links cause ownership headaches. Solve this with -h:
|
If you want a hard link, this will make a single file exist in two locations.
|
||||||
|
If it is deleted in one location, it continues to exist in the other.
|
||||||
|
|
||||||
> chown -h user1 mysymlink
|
> ln *X* *Y*
|
||||||
|
|
||||||
|
Both files must be on the same hard drive, as they have the same inode (check this with `ls -i file`).
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "locale"
|
title: "locale"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
A list of supported locales is available at /usr/share/i18n/SUPPORTED
|
A list of supported locales is available at /usr/share/i18n/SUPPORTED
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: "locating"
|
title: "locating"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
|
# Type
|
||||||
|
|
||||||
|
`type` shows what kind of thing you're running, be it an alias, function, or binary program.
|
||||||
|
|
||||||
|
> type cmus
|
||||||
|
|
||||||
# Whereis the Program
|
# Whereis the Program
|
||||||
|
|
||||||
Ask where the `angband` program is, along with all its configuration files:
|
Ask where the `angband` program is, along with all its configuration files:
|
||||||
@ -12,13 +18,10 @@ Also `which` shows where a binary file (the program) is,
|
|||||||
|
|
||||||
> which cmus
|
> which cmus
|
||||||
|
|
||||||
`type` shows what kind of thing you're running, be it an alias, or binary program.
|
|
||||||
|
|
||||||
> type cmus
|
|
||||||
|
|
||||||
# Quick Search for Files
|
# Quick Search for Files
|
||||||
|
|
||||||
You'll need to set up `locate` for this by installing `mlocate`. `mlocate` needs a list of all files on the machine, so run:
|
You'll need to set up `locate` for this by installing `mlocate`.
|
||||||
|
`mlocate` needs a list of all files on the machine, so run:
|
||||||
|
|
||||||
> sudo updatedb
|
> sudo updatedb
|
||||||
|
|
||||||
@ -26,3 +29,5 @@ Then to find a file called 'my-cats.jpg', run:
|
|||||||
|
|
||||||
> locate cats
|
> locate cats
|
||||||
|
|
||||||
|
For best results, run `updatedb` regularly, perhaps in crontab.
|
||||||
|
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
---
|
|
||||||
title: "packages"
|
|
||||||
tags: [ "Documentation", "basics" ]
|
|
||||||
---
|
|
||||||
# Looking
|
|
||||||
|
|
||||||
Your package has something to do with unzipping. Find out more:
|
|
||||||
|
|
||||||
> apropos unzip
|
|
||||||
|
|
||||||
# Maintenance
|
|
||||||
|
|
||||||
> dpkg -l
|
|
||||||
|
|
||||||
List what's installed.
|
|
||||||
|
|
||||||
# Libraries
|
|
||||||
|
|
||||||
Libraries under /lib/ typically contain an .so suffix when they're dynamic. It means 'shared object' as a number of programs will refer to it.
|
|
||||||
|
|
||||||
Others will have an /a/ suffix, meaning that they're static, and will be loaded at runtime.
|
|
||||||
|
|
||||||
We can check the dependencies of a program using the ldd command upon anything in a library. For example:
|
|
||||||
|
|
||||||
> ldd/usr/bin/md5sum
|
|
||||||
|
|
||||||
... shows us that md5sum depends upon:
|
|
||||||
|
|
||||||
- linux-vdso.so.1
|
|
||||||
|
|
||||||
- libc.so.6
|
|
||||||
|
|
||||||
- lib64/ld-linux-x86-64.so.2
|
|
||||||
|
|
||||||
To list all libraries, run:
|
|
||||||
|
|
||||||
> ldconfig -p
|
|
||||||
|
|
||||||
For example, if looking at /usr/lib/x86_64-linux-gnu/libXcomposite.so.1, we might wonder what it's for. We can then run:
|
|
||||||
|
|
||||||
> ldconfig -p | grep libXcomposite
|
|
||||||
|
|
||||||
... and find out nothing except that it redirects /usr/lib/x86...
|
|
||||||
|
|
||||||
So at least we know where it is.
|
|
||||||
|
|
||||||
> ldconfig -p | grep usb
|
|
||||||
|
|
||||||
... this will show where things which nominally relate to usbs live.
|
|
||||||
|
|
||||||
You can add to the libarary path by putting just any text file in /etc/ld.so.cache, e.g. in Arch where the path to the fakeroot environment is placed there.
|
|
||||||
|
|
@ -1,19 +1,7 @@
|
|||||||
---
|
---
|
||||||
title: "processes"
|
title: "processes"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
# Free
|
|
||||||
|
|
||||||
See free space with:
|
|
||||||
|
|
||||||
> free
|
|
||||||
|
|
||||||
and make it human readable with:
|
|
||||||
|
|
||||||
> free -h
|
|
||||||
|
|
||||||
Or `-m` for megabytes.
|
|
||||||
|
|
||||||
# Proccesses
|
# Proccesses
|
||||||
|
|
||||||
See running items in current terminal with
|
See running items in current terminal with
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
title: "shell"
|
|
||||||
tags: [ "Documentation", "basics" ]
|
|
||||||
---
|
|
||||||
|
|
||||||
Dash - fast but limited funcionality, great for scripts
|
|
||||||
|
|
||||||
sh - a simple link to whatever your default shell is
|
|
||||||
|
|
||||||
bash - the standard
|
|
||||||
|
|
||||||
elvish - user-friendly, but new, with a full file-browser embedded into the system.
|
|
||||||
|
|
||||||
# Login
|
|
||||||
|
|
||||||
All shells launch either as login or non-login. All remote sessions without a GUI withl require authentication, and therefore will be login.
|
|
||||||
|
|
||||||
## Login
|
|
||||||
|
|
||||||
These shells start by reading /etc/profile then the first of ~/.bash_profile, ~/.bash_login or ~/.profile, and load all given values.
|
|
||||||
|
|
||||||
## Non-Login
|
|
||||||
|
|
||||||
Non-login shells will read /etc/bash.bashrc and then the ~/.bashrc file. You can summon the different shell perameters with the command `.`.
|
|
||||||
|
|
||||||
For example, so summon the file ~/.bashrc, you can perform:
|
|
||||||
|
|
||||||
`. ~/.bashrc`
|
|
||||||
|
|
||||||
How the logout is handled depends upon ~/.bash_logout
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
|
|
||||||
The default shell config files to create for a new user are under /etc/skel.
|
|
||||||
|
|
||||||
# Shellcheck
|
|
||||||
|
|
||||||
Run `shellcheck script.sh` on your scripts to check them for mistakes.
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "time"
|
title: "time"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
# systemd
|
# systemd
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ Set time to synchronize with an ntp server:
|
|||||||
|
|
||||||
> timedatectl set-ntp true
|
> timedatectl set-ntp true
|
||||||
|
|
||||||
This info stays in /usr/share/zoneinfo
|
This info stays in `/usr/share/zoneinfo`.
|
||||||
|
|
||||||
# Local Time
|
# Local Time
|
||||||
|
|
||||||
@ -46,21 +46,9 @@ Then set that language, with:
|
|||||||
|
|
||||||
# Network Time Protocol
|
# Network Time Protocol
|
||||||
|
|
||||||
Enter the shell with:
|
Glimpse an overview with:
|
||||||
|
|
||||||
> ntpq
|
> ntpq -p
|
||||||
|
|
||||||
Or just glimpse and overview with:
|
Usually this is run as a service, so just start that service.
|
||||||
|
|
||||||
> ntpq -q
|
|
||||||
|
|
||||||
This clock can drift, which is then listed under /var/log/ntp.drift
|
|
||||||
|
|
||||||
The config is under /etc/ntp.conf. If a line for the stats directory is listed, it'll log stats, e.g.:
|
|
||||||
|
|
||||||
`statsdir /var/log/ntpstats/`
|
|
||||||
|
|
||||||
This can show if clock drift occurs.
|
|
||||||
|
|
||||||
The config file also lets you specify servers to obtain time from.
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "users"
|
title: "users"
|
||||||
tags: [ "Documentation", "basics" ]
|
tags: [ "Documentation", "Basics" ]
|
||||||
---
|
---
|
||||||
# Basic Information
|
# Basic Information
|
||||||
|
|
||||||
@ -14,8 +14,6 @@ Obviously:
|
|||||||
|
|
||||||
> getent shadow
|
> getent shadow
|
||||||
|
|
||||||
will require sudo.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
> sudo adduser maestro
|
> sudo adduser maestro
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "email"
|
|
||||||
tags: [ "Documentation", "chat" ]
|
|
||||||
---
|
|
||||||
# Sendmail
|
|
||||||
|
|
||||||
Compose a message like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
To: alice@domain.com
|
|
||||||
Subject: my new mail server
|
|
||||||
From: literally@anything.com
|
|
||||||
|
|
||||||
This is the message
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
... and put it in ~/mail.txt.
|
|
||||||
Then send with sendmail using:
|
|
||||||
|
|
||||||
> sendmail ~/mail.txt
|
|
||||||
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
title: "irssi"
|
|
||||||
tags: [ "Documentation", "chat" ]
|
|
||||||
---
|
|
||||||
In program:
|
|
||||||
|
|
||||||
> /NETWORK LIST
|
|
||||||
> /CHANNEL LIST
|
|
||||||
> /connect chat.freenode.net
|
|
||||||
> /set nick ghast
|
|
||||||
|
|
||||||
> /join #hklbgd
|
|
||||||
> /leave #lkj
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "profanity"
|
title: "profanity"
|
||||||
tags: [ "Documentation", "chat" ]
|
tags: [ "Documentation", "Chat" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
# Pre Setup
|
# Pre Setup
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "signal"
|
title: "signal"
|
||||||
tags: [ "Documentation", "distros" ]
|
tags: [ "Documentation", "Chat" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
> yay -S signal-cli
|
> yay -S signal-cli
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "wgetpaste"
|
title: "wgetpaste"
|
||||||
tags: [ "Documentation", "chat" ]
|
tags: [ "Documentation", "Chat" ]
|
||||||
---
|
---
|
||||||
|
|
||||||
See available pastebins:
|
See available pastebins:
|
||||||
@ -19,4 +19,3 @@ Paste in the file then load the result to the right-hand clipboard:
|
|||||||
|
|
||||||
> wgetpaste -s dpaste -X
|
> wgetpaste -s dpaste -X
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user