Kernel and distributions
Linux is the kernel. A distribution adds the shell, tools, package manager and support. Enterprise picks: RHEL and its rebuilds (Rocky, Alma), Ubuntu Server, SUSE, Debian.
Linux runs most of the cloud, every container and almost every server you will touch. Learn the core ideas in ten minutes, then keep the cheatsheet open while you work. Part of Cloud School Operating Systems.
Linux is the kernel. A distribution adds the shell, tools, package manager and support. Enterprise picks: RHEL and its rebuilds (Rocky, Alma), Ubuntu Server, SUSE, Debian.
One tree starts at /. Config lives in /etc, logs and data in /var, users in /home, devices in /dev, kernel info in /proc and /sys.
bash (or zsh) is how you talk to the system. Small tools do one job each and you chain them with pipes: ps aux | grep nginx. Redirect output with > and >>.
Every file has an owner, a group and read, write, execute bits for each. root can do anything, so admins work as a normal user and use sudo when needed.
Install software from signed repositories, never random downloads. RHEL family uses dnf (RPM), Debian and Ubuntu use apt (DEB), SUSE uses zypper.
systemd starts the system and manages services, timers and logs. systemctl controls services and journalctl reads their logs.
ip shows addresses and routes, ss shows open ports, NetworkManager or netplan holds the config. Firewalls: firewalld (RHEL) or ufw (Ubuntu) on top of nftables.
Disks become partitions, often LVM volumes, then file systems (ext4, XFS, Btrfs) mounted into the tree. /etc/fstab mounts them at boot.
Patch often, log in with SSH keys not passwords, disable root SSH login, keep SELinux (RHEL) or AppArmor (Ubuntu) enforcing, and open only the ports you need.
Add --help to any command, or read its manual with man <command>.
pwd where am Ils -lah list all files with sizescd /var/log go to a folder, cd - go backtree -L 2 show a folder treefind / -name "*.conf" find files by namecp -r src dst copy, mv a b move or renamerm file, rm -r dir delete (no recycle bin)mkdir -p a/b/c create foldersln -s target link symbolic linktar -czf a.tgz dir pack, tar -xzf a.tgz unpackcat, less, head -n 20, tail -f read filesgrep -ri "error" /var/log search textwc -l count lines, sort | uniq -c count valuescut, awk '{print $1}', sed 's/a/b/g' slice and editnano or vim edit fileschmod 640 file, chmod +x script.shchown user:group file change ownersudo command run as rootuseradd -m alice, passwd alice, usermod -aG wheel aliceid, whoami, who who is whotop or htop live viewps aux all processes, pgrep nginx find onekill PID, kill -9 PID stop a processfree -h memory, uptime loaduname -r kernel, cat /etc/os-release distrosudo dnf install nginx / sudo apt install nginxsudo dnf upgrade / sudo apt update && sudo apt upgradednf search x / apt search xdnf remove x / apt remove xrpm -qa / dpkg -l list installedsystemctl status nginxsudo systemctl enable --now nginx start now and at bootsudo systemctl restart nginxjournalctl -u nginx -f follow a service's logjournalctl -p err -b errors since bootip a addresses, ip r routesss -tulpn listening ports and their processping, dig example.com, curl -I https://sitessh user@host, scp file user@host:/tmpsudo firewall-cmd --add-service=http --permanent / sudo ufw allow 80df -h free space, du -sh * folder sizeslsblk disks and partitionsmount /dev/sdb1 /data, umount /datapvs, vgs, lvs LVM overviewblkid UUIDs for /etc/fstab| Shortcut or symbol | What it does |
|---|---|
| Tab | Complete a command or path. Press twice to list options. |
| Ctrl+C / Ctrl+R | Stop the running command / search command history. |
| | | Pipe: send one command's output into the next. |
| > / >> / 2>&1 | Write output to a file / append / include errors. |
| && / || | Run the next command only if the last one worked / failed. |
| ~ / . / .. | Your home folder / this folder / the parent folder. |
| rwx = 4 2 1 | Permission digits: 755 is rwxr-xr-x, 640 is rw-r-----. |
Run a free VM (Hyper-V, VirtualBox, WSL on Windows) or a small cloud VM with Ubuntu Server or Rocky Linux.
Move around, edit files, use pipes and read man pages until the cheatsheet above feels natural.
Users and sudo, packages, systemd services, logs, networking, firewall and storage with LVM.
bash scripts, cron and systemd timers, SSH keys, SELinux or AppArmor, then Ansible and containers. Scripts on code.cloudschool.ai.
Also run Windows? See windows.cloudschool.ai, or compare both on os.cloudschool.ai.