diff --git a/basics/at.md b/basics/at.md index dbeb72b..901d3dc 100644 --- a/basics/at.md +++ b/basics/at.md @@ -1,6 +1,6 @@ --- title: "at" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- Install with: diff --git a/basics/basics.md b/basics/basics.md index 14fba02..5f6c444 100644 --- a/basics/basics.md +++ b/basics/basics.md @@ -1,6 +1,6 @@ --- -title: "basics" -tags: [ "Documentation", "basics" ] +title: "Basics" +tags: [ "Documentation", "Basics" ] --- You need about a dozen commands to move around Linux. diff --git a/basics/clock.md b/basics/clock.md index 51e1692..00096a2 100644 --- a/basics/clock.md +++ b/basics/clock.md @@ -1,6 +1,6 @@ --- title: "clock" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- Show system time: diff --git a/basics/conditionals.md b/basics/conditionals.md index 9795f83..53681d0 100644 --- a/basics/conditionals.md +++ b/basics/conditionals.md @@ -1,6 +1,6 @@ --- title: "conditionals" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- # If statements diff --git a/basics/cron.md b/basics/cron.md index bee5715..f66406a 100644 --- a/basics/cron.md +++ b/basics/cron.md @@ -1,6 +1,6 @@ --- title: "cron" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- # Cron diff --git a/basics/kernel.md b/basics/kernel.md index 08bca8c..d29f37c 100644 --- a/basics/kernel.md +++ b/basics/kernel.md @@ -1,11 +1,13 @@ --- title: "kernel" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- -# Living Space +## Living Space Kernel modules live in lib/modules/$(uname -r) +## Change + Load them with > sudo modprobe ath9k @@ -16,5 +18,9 @@ Or remove one 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 diff --git a/basics/kill.md b/basics/kill.md index 60228cd..a68c478 100644 --- a/basics/kill.md +++ b/basics/kill.md @@ -1,16 +1,17 @@ --- 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 Then click on the application which you want to kill. -## All Programs +# All Programs To kill a program, find it with: @@ -22,7 +23,7 @@ Kill the program with: > kill 19643 -## Types of Kill +# Types of Kill To see an ordered list of termination signals: diff --git a/basics/links.md b/basics/links.md index 1406760..4b39a46 100644 --- a/basics/links.md +++ b/basics/links.md @@ -1,12 +1,15 @@ --- title: "links" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- Link from X to 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`). diff --git a/basics/locale.md b/basics/locale.md index fbbb485..a63a390 100644 --- a/basics/locale.md +++ b/basics/locale.md @@ -1,6 +1,6 @@ --- title: "locale" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- A list of supported locales is available at /usr/share/i18n/SUPPORTED diff --git a/basics/locating.md b/basics/locating.md index 80c7340..90f8560 100644 --- a/basics/locating.md +++ b/basics/locating.md @@ -1,7 +1,13 @@ --- 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 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 -`type` shows what kind of thing you're running, be it an alias, or binary program. - -> type cmus - # 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 @@ -26,3 +29,5 @@ Then to find a file called 'my-cats.jpg', run: > locate cats +For best results, run `updatedb` regularly, perhaps in crontab. + diff --git a/basics/packages.md b/basics/packages.md deleted file mode 100644 index 30b86ae..0000000 --- a/basics/packages.md +++ /dev/null @@ -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. - diff --git a/basics/processes.md b/basics/processes.md index ef9c20f..ba7ac40 100644 --- a/basics/processes.md +++ b/basics/processes.md @@ -1,19 +1,7 @@ --- 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 See running items in current terminal with diff --git a/basics/shell.md b/basics/shell.md deleted file mode 100644 index 5266bc8..0000000 --- a/basics/shell.md +++ /dev/null @@ -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. - diff --git a/basics/time.md b/basics/time.md index d44eb83..47b3a2f 100644 --- a/basics/time.md +++ b/basics/time.md @@ -1,6 +1,6 @@ --- title: "time" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- # systemd @@ -8,7 +8,7 @@ Set time to synchronize with an ntp server: > timedatectl set-ntp true -This info stays in /usr/share/zoneinfo +This info stays in `/usr/share/zoneinfo`. # Local Time @@ -46,21 +46,9 @@ Then set that language, with: # Network Time Protocol -Enter the shell with: +Glimpse an overview with: -> ntpq +> ntpq -p -Or just glimpse and overview with: - -> 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. +Usually this is run as a service, so just start that service. diff --git a/basics/users.md b/basics/users.md index b4d8dcf..d8c2eb2 100644 --- a/basics/users.md +++ b/basics/users.md @@ -1,6 +1,6 @@ --- title: "users" -tags: [ "Documentation", "basics" ] +tags: [ "Documentation", "Basics" ] --- # Basic Information @@ -14,8 +14,6 @@ Obviously: > getent shadow -will require sudo. - ## Examples > sudo adduser maestro diff --git a/chat/email.md b/chat/email.md deleted file mode 100644 index be9100c..0000000 --- a/chat/email.md +++ /dev/null @@ -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 - - diff --git a/chat/irssi.md b/chat/irssi.md deleted file mode 100644 index c52d544..0000000 --- a/chat/irssi.md +++ /dev/null @@ -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 - - diff --git a/chat/profanity.md b/chat/profanity.md index 0095a1e..c910f78 100644 --- a/chat/profanity.md +++ b/chat/profanity.md @@ -1,6 +1,6 @@ --- title: "profanity" -tags: [ "Documentation", "chat" ] +tags: [ "Documentation", "Chat" ] --- # Pre Setup diff --git a/chat/signal-cli.md b/chat/signal-cli.md index e196a36..9165d57 100644 --- a/chat/signal-cli.md +++ b/chat/signal-cli.md @@ -1,6 +1,6 @@ --- title: "signal" -tags: [ "Documentation", "distros" ] +tags: [ "Documentation", "Chat" ] --- > yay -S signal-cli diff --git a/chat/wgetpaste.md b/chat/wgetpaste.md index 265ccc5..06c7439 100644 --- a/chat/wgetpaste.md +++ b/chat/wgetpaste.md @@ -1,6 +1,6 @@ --- title: "wgetpaste" -tags: [ "Documentation", "chat" ] +tags: [ "Documentation", "Chat" ] --- See available pastebins: @@ -19,4 +19,3 @@ Paste in the file then load the result to the right-hand clipboard: > wgetpaste -s dpaste -X -