General Links
- Regex101.com: An online aid platform to practice Regex
- Very cool visual man page for shell explainshell.com (Recommended)
- AWK guide by Melvyn Drag (YouTube - 51 mins)
- Regex tutorial from scratch by Corey Schafer (YouTube - 38 mins)
- Linux CLI and shell environment from MIT (Youtube - Highly recommended. Very deep and comprehensive)
Terminals
(Session Managers, Terminals & Emulators - Tmux, Terminator, Warp, Teleport, Termius, WSL, Tricks like Vim in Bash, etc.)
Shell Scripting
(Only references):
Unix + S3 mounting via rclone
Process Control
Nohup vs. Disown:
nohup
anddisown
are both used to run a command in the background and detach it from the terminal, but they work in slightly different ways:
nohup
(short for "no hangup") is a command that is used to run a command in the background and prevent it from being terminated when the terminal is closed or the user logs out. This is done by redirecting the input and output of the command to a file callednohup.out
and ignoring the SIGHUP signal (which is the signal that is sent to a process when the terminal is closed or the user logs out).disown
is a command that is used to remove a job from the job control of the current shell. Once a job has been disowned, it can still be running in the background, but it can no longer be controlled by the shell. This means that it will not be affected by the terminal being closed or the user logging out.In summary,
nohup
is used to run a command in the background and prevent it from being terminated when the terminal is closed or the user logs out, whiledisown
is used to remove a job from the job control of the current shell.
# Keep a process Running in the background after session is terminated:
nohup <command> & # Will not throw anything to stdout, while:
#
nohup mycommand > mycommand.log & # Will "catch" the stdout generated
Utilities
Symlinks: ln -s /original /newFolder
Networking
DNS - NetworkManager
(Systemctl & NetworkManager)
vim /etc/NetworkManager/conf.d/dns.conf
[main]
dns=none
# (Modify /etc/resolv.conf) - Optional: Remove "Generated by NetworkManager" in /etc/resolv.conf
systemctl reload NetworkManager
Scripting
"Command Line Kung Fu"
Bash Scripting Cheatsheet
General Linux info/how-to
Security
ACM - Access Control Model
- Discretionary Access Control (DAC) At user's "Discretion" (sudo, Permissions, privileges), based on files & users. Model: Subject/Object.
- NDAC - Non-discretionary Access Control
- RBAC - Role-Based Access Control (Groups)
- MAC - Mandatory Access Control - Groups + Object/Subject. Labeling objects based on privileges, clearance of subject, etc. Example: SELinux
Security Frameworks
Software, Modules - GrSecurity / AppArmor / SELinux:
- Apparmor -> Per program & permissions. Easiest to setup. Lightweight.
- SELinux -> Implements MAC model Limits permissions of programs/users. Strong & Heavy Administration Load. For static systems (Web Servers, etc.).
- GrSecurity -> Low configuration. Not default. Link:https://micahflee.com/2016/01/debian-grsecurity/ (Comprehensive)Link:https://grsecurity.net/compare
- GrSecurity enabled kernels for debian: ColdKernel
Comparison: (OLD) https://www.cyberciti.biz/tips/selinux-vs-apparmor-vs-grsecurity.html
PAX -> Patch 4 linux kernel. Least-privilege approach. PaX + Frameworks
Link: https://alpinelinux.org/downloads/
LSM - Linux Security Modules:
Semi-hardened Linux Distributions:
- Pentoo Linux
- Alpine Linux - Main Features: Security/lightweight (VERY lightweight - takes a while to boot it for the first time)
- Arch Linux (Uses PaX & GrSecurity)
Hardening & Auditing - General
- General Links
- Terminals
- Shell Scripting
- Unix + S3 mounting via rclone
- Process Control
- Utilities
- Networking
- DNS - NetworkManager
- Scripting
- Security
- Hardening & Auditing - General
Sans Hardening and security Checklist: