Linux-Commands
Linux Commands Reference
A practical, Ubuntu-first command encyclopedia for daily administration, scripting, and troubleshooting.
Each chapter covers one command (or a tight family): syntax, important options, realistic examples, output notes, safety tips where it matters, and related tools.
How to use this book
- Browse by part in the sidebar (files, processes, networking, packages, …).
- Search for a command name when you already know what you need.
- Prefer worked examples over option dumps — copy, adapt, verify.
- For shell programming (functions, arrays,
set -euo pipefail), see Linux-ShellScripting-Bash in this monorepo. - For containers, editors, and homelab design, use the sibling books — this one stays on the CLI surface.
Page template
Most pages follow this shape:
- Overview
- Syntax
- Common options
- Key use cases
- Examples with explanations
- Understanding output (when useful)
- Common patterns / pitfalls
- Related commands
- Further reading
Short utilities may use a lighter form (overview + examples + related).
Parts at a glance
| Part | Focus |
|---|---|
| Help and docs | man, info, help, apropos, whatis |
| Files and paths | Navigation, copy/move, permissions, search (find, locate) |
| Archives and compression | tar, gzip, xz, zstd, zip family |
| System information | Host identity, memory, users online, hardware summaries |
| Processes and jobs | ps, top, signals, job control, priority |
| System monitoring | iostat, vmstat, sar, mpstat |
| Users and groups | Accounts, passwords, aging |
| Networking | ip, ss, DNS, SSH, transfer, firewalls, capture |
| Scheduling | cron, crontab, at, anacron |
| Logging | logger, logrotate (see also journalctl) |
| Hardware | lshw, lspci, dmidecode, hdparm |
| Storage and filesystems | lsblk, mount, mkfs, fsck, … |
| Terminals and mux | tmux, screen, and friends |
| Text and pipes | grep, sed, awk, jq, sort/uniq pipelines |
| Packages | apt/dpkg, dnf/rpm, yum |
| Services and runtime | systemctl, journalctl, reboot/shutdown |
| Printing | CUPS client (lp, …) |
| Appendices | Cheatsheets and longer extras |
Conventions
- Examples assume a modern GNU/Linux userland (Ubuntu 22.04/24.04 compatible unless noted).
- Prefer
ip/ss/systemctlover legacyifconfig/netstat/ SysV-only workflows. - Destructive commands include safety notes (
rm,mkfs,dd-style operations, firewall changes). - “Related commands” point to other chapters in this book when they exist.
Suggested learning paths
New to the shell
- Help and docs → Files and paths (
ls,cd,cp,mv,rm,chmod)
- Text and pipes (
cat,less,grep,head/tail)
- Processes (
ps,top, job control)
Day-2 operator
- Services (
systemctl,journalctl)
- Networking (
ip,ss,ping,curl,ssh)
- Packages (
apt) and storage (df,du,lsblk)
Troubleshooter
- Monitoring (
vmstat,iostat,top)
- Network path (
ping,traceroute,ss,tcpdump)
- Logs (
journalctl,logrotate,logger)
Contributing shape
When adding a command page under content/<part>/:
- Use a lowercase filename matching the command (
jq.md,zstd.md). - Prefer the shared template in
content/_planning/command-page-template.md. - Run
bash scripts/update-index.shfrom this book directory. - Do not hand-edit
_quarto.yml.