Cheatsheets
Linux admin
systemd, users & permissions, packages, processes, and networking commands.
Visualize
Linux — file permissions (rwx ↔ octal)
Each octal digit is r(4) + w(2) + x(1) for owner, group, other — toggle the bits and watch chmod update.
Each digit is one class: r=4 + w=2 + x=1. So 7=rwx, 5=r-x, 4=r--, 6=rw-.
Virtual memory — paging (3D)
The MMU maps each contiguous virtual page to any scattered physical frame via the page table.
31 entries
System & services7
systemctl status <svc>Recipe: diagnose why a service won't start.
systemctl start|stop|restart <svc>Control a service
systemctl enable --now <svc>Start now + on boot
journalctl -u <svc> -fFollow a service's logs
uname -a / hostnamectlKernel / host info
uptime / top / htopLoad & live processes
free -h / df -hMemory / disk usage
Users & permissions7
sudo <cmd>Run as root
useradd -m -s /bin/bash bobCreate a user with a home
passwd bobSet a password
usermod -aG sudo bobAdd user to a group
chown user:group fileChange ownership
chmod 750 dirSet permissions — read the octal as owner/group/other.
id / groupsShow current user's ids/groups
Packages5
apt update && apt upgradeDebian/Ubuntu update
apt install <pkg>Install (apt)
dnf install <pkg>Install (Fedora/RHEL)
pacman -S <pkg>Install (Arch)
which <cmd> / type <cmd>Locate a command
Processes & disk6
ps aux | grep <name>Recipe: find and stop a runaway process.
kill -9 <pid> / pkill <name>Force-terminate a process.
nice / reniceAdjust process priority
lsof -i :<port>What's using a port
du -sh * | sort -hRecipe: find what's filling the disk.
mount / lsblkMounts / block devices
Networking & transfer6
ip a / ip routeInterfaces / routes
ss -tulpnListening sockets
ufw allow 22/tcpFirewall rule (Ubuntu)
ssh user@hostRemote shell
scp file user@host:/pathCopy over SSH
rsync -avz src/ host:/dst/Efficient incremental sync over SSH.