← All Learning Pathways

Linux Mastery: 300 Commands

A working reference for the 300 most-used Linux commands, organized into 9 topic-grouped articles. Read top to bottom for a structured tour, or jump to whichever you need today.

9 articles • follow them in order

  1. 1
    Linux Admin

    Linux File & Directory Operations: ls, cd, cp, mv, rm, find

    Working reference for the Linux file and directory commands you type thousands of times a year. ls with -l/-la/-lh/-ltr/-ld variations, the cd - bounce trick, mkdir -p for idempotent path creation, cp -a for archive-style copies (with the trailing-slash gotcha), mv for both rename and move, rm -rf danger and the safer find -print -> find -delete pattern, find by name/size/mtime/owner with -exec and -delete, locate vs find (locate is fast but stale), symbolic links with ln -s, the 10 commands that cover 95 percent of daily use, and the common pitfalls (rm -rf with unset variable, trailing-slash confusion, unquoted spaces in filenames).

  2. 2
    Linux Admin

    Linux Text Processing: grep, awk, sed, sort, and Friends

    Working reference for Linux text processing on the command line. grep with -i / -v / -r / -E / -A -B context / -c count / -l filenames-only, awk field-based ( to ) with custom -F separator and condition { action } pattern, sed s/old/new/g / -i in-place / -i.bak with backup / d for delete / p for print, sort -n / -k by column / -t separator, uniq -c -d (needs sorted input!), wc / head / tail -f / cut / tr character translations, and xargs with -0 for null-separated filenames. Real pipelines: top 10 404 IPs from nginx, active SSH users by frequency, mass sed-replace across config files. Pitfalls: grep regex vs -F fixed-string, sed -i destroys silently, tail -F (uppercase) for log rotation, xargs without -0 breaks on filenames with spaces.

  3. 3
    Linux Admin

    Linux File Permissions: chmod, chown, umask, and ACLs

    Working reference for Linux file permissions. The 9-bit model (user/group/other times rwx), octal shorthand (r=4 w=2 x=1, classic 755 / 644 / 600 / 700 / 777-no-please), reading the ls -l first column for file types (-, d, l, c, b, s, p), chmod numeric vs symbolic syntax, the recursive-chmod foot-gun (use find -type f vs -type d separately, or X capital), chown / chgrp ownership changes, umask defaults (022 vs 027 vs 077), the three special bits (setuid 4 / setgid 2 / sticky 1) with /tmp and /usr/bin/passwd as examples, POSIX ACLs (setfacl -m u:bob:r--) for when 9 bits arent enough. Pitfalls: chmod -R 755 on code trees, SSH 600 / 700 requirements, web-server reading uploads, setuid on scripts (ignored), and what r/w/x actually mean for directories.

  4. 4
    Linux Admin

    Linux Process Management: ps, top, kill, jobs, cron, nice

    Working reference for Linux process management. ps aux vs ps -ef and the sort flags (--sort=-%mem / -%cpu), interactive viewers (top with P/M/k shortcuts, htop, btop), pstree for hierarchy, the seven signals you actually need (SIGHUP/INT/QUIT/TERM/KILL/STOP/CONT) and why SIGTERM-first-then-SIGKILL beats SIGKILL alone, killall vs pkill, foreground/background job control with & / fg / bg / disown / nohup vs the modern tmux alternative for survive-logout sessions, cron 5-field syntax with the full-paths gotcha, at for one-shots, systemd timers as the modern replacement, nice / renice / ionice for priority (counter-intuitive higher-number-equals-lower-priority). Pitfalls: SIGKILL too soon, cron silent failures, nohup doesn't imply background, parent-kill doesn't reap children.

  5. 5
    Linux Admin

    Linux Disk & Filesystem: lsblk, mount, fstab, fsck

    Working reference for Linux disk and filesystem management. The four-layer model (block device > partition > filesystem > mount point), lsblk for orientation, df -h vs df -i (inode exhaustion looks like out-of-space), du and ncdu for finding disk hogs, partitioning with fdisk / parted / cfdisk (and when MBR vs GPT), mkfs for ext4 / xfs / btrfs / vfat, manual mount and umount with -l lazy and lsof / fuser to find what's blocking unmount, persistent /etc/fstab (UUID-not-device, six-field syntax, mount -a to test before reboot, nofail for non-critical), the menu of mount options (noatime, nosuid, noexec), fsck only on unmounted FS, swap setup with fallocate / mkswap / swapon. Pitfalls: out of inodes, fstab blocks boot, sdX name shift, fsck on mounted, missing chmod 600 on swap.

  6. 6
    Linux Admin

    Linux System Monitoring: vmstat, top, iostat, sar, journalctl

    Working playbook for diagnosing a slow Linux server. The 60-second triage sequence (uptime, dmesg -T, vmstat 1 5, free -h, df -h + df -i), reading load average against nproc CPU count, what each %CPU breakdown means in top (us/sy/id/wa, with iowait being the disk-pressure tell), the eight vmstat numbers that matter (r runnable, b blocked, swpd / si / so swap activity, bi / bo block I/O), available vs free memory (Linux file caching makes free deceptively small), iostat -x for per-device IOPS / await / %util, dmesg -T for kernel-level errors and OOM-killer activity, journalctl -u SERVICE -f as the systemd tail -f, sar / sysstat for historical data so you can answer 'was it slow at 3 AM yesterday', ss / lsof / strace / pmap for per-process deep dives. Pitfalls: looking at free not available, one vmstat sample is meaningless, high load isn't always CPU.

  7. 7
    Linux Admin

    Linux Networking Commands: ip, ss, ssh, curl, dig, tcpdump

    Working reference for Linux networking from the command line. The modern iproute2 toolchain (ip a / ip r / ip link replacing ifconfig / route, ss replacing netstat, bridge replacing brctl), the killer ip route get DESTINATION command, ss flag combos for listening sockets and established connections, ping / traceroute / mtr for path diagnosis, dig +short and dig +trace for DNS, ssh with port-forward (-L / -R / -D / -J jump host) and ~/.ssh/config persistence, scp vs rsync (rsync -avPn for dry-run before destructive sync), the trailing-slash gotcha on rsync source, curl flags (-I headers / -L follow / -X POST / -v verbose), wget -c continue, and tcpdump for packet capture (-w to save for Wireshark). Pitfalls: deprecated ifconfig misleads on multi-IP, DNS-vs-network confusion, scp -P / ssh -p capital mismatch, MTU surprises over tunnels.

  8. 8
    Linux Admin

    Linux Archives & Compression: tar, gzip, xz, zstd, zip

    Working reference for Linux archives and compression. tar bundles, gzip / bzip2 / xz / zstd / lz4 squeeze - speed vs ratio trade-offs (zstd as modern Pareto-optimal default, gzip for compatibility, xz for tightest), tar create / extract / list flags (c / x / t / f / v / z / j / J / a auto-detect), the c-vs-x mnemonic, common --exclude patterns, the zcat / zless / zgrep family for working with compressed files in place, zip for cross-platform Windows-friendly archives, 7z for strong AES encryption, recipes (timestamped backups, archive verification, streaming over SSH, parallel compression with pigz / pbzip2 / zstd -T0). Pitfalls: tar c-vs-x mixup, recursive backup-includes-itself, re-compressing already-compressed media, xz memory hunger on small VMs, gzip removing the original.

  9. 9
    Linux Admin

    Linux User & Service Management: useradd, sudo, systemctl, journalctl

    Working reference for Linux user and service management. The /etc/passwd / shadow / group files behind the tools, useradd vs adduser (scripting vs interactive), the critical usermod -aG (vs -G alone wiping groups), su vs sudo with sudo as the preferred default, visudo and per-file /etc/sudoers.d/ drop-ins, group management with groupadd / gpasswd. The systemd toolkit: systemctl start / stop / restart / reload / enable / disable / mask, list-units --state=failed, daemon-reload after unit edits, journalctl with -u SERVICE -f / -p err / --since / -b -1 previous boot / --vacuum-time. Minimal custom unit file template. Pitfalls: usermod -G without -a, editing sudoers with vim directly, forgetting daemon-reload, restart instead of reload, userdel -r vs without.