How the examples are run
No output on this site is typed by hand. Each rebuild runs every example in a sandbox and the pages show what came back.
This build
The run took 212 seconds. Examples that could not run in the sandbox (43 of them) say so on their page and show no output:
| Command | Example | Why it was not run |
|---|---|---|
dd | Write an image to a USB stick | writes to a real block device and needs root; the sandbox has neither |
dd | Back up the first sector of a disk | reads a real disk device as root |
df | The full mount list on a real machine | on a container this lists the build host's mounts; run it on your own machine |
hostname | Set the host name permanently with systemd | needs systemd and root, which the sandbox does not have |
ip | Add an address, bring a link up, add a default route | needs root and a real network interface; the sandbox has neither |
journalctl | Show the logs of one service | needs a systemd journal; not available in the build sandbox |
journalctl | Follow a service's log live | needs a systemd journal; not available in the build sandbox |
journalctl | Show the last lines without a pager | needs a systemd journal; not available in the build sandbox |
journalctl | Show messages from the current or previous boot | needs a systemd journal; not available in the build sandbox |
journalctl | Show only errors and worse | needs a systemd journal; not available in the build sandbox |
journalctl | Show a time window | needs a systemd journal; not available in the build sandbox |
journalctl | Show kernel messages | needs a systemd journal; not available in the build sandbox |
journalctl | Search message text | needs a systemd journal; not available in the build sandbox |
journalctl | Get structured output for tools | needs a systemd journal; not available in the build sandbox |
journalctl | Print only the message text | needs a systemd journal; not available in the build sandbox |
journalctl | See how much disk the journal uses | needs a systemd journal; not available in the build sandbox |
journalctl | Shrink the journal | needs a systemd journal and root; not available in the build sandbox |
journalctl | Read your own user services' logs | needs a systemd journal; not available in the build sandbox |
less | Open a file at the first match | needs an interactive terminal; without one less copies the file and ignores the starting position |
less | Long lines and line numbers for log reading | needs an interactive terminal; without one less ignores display options like -N and -S |
lsblk | List disks and partitions | lists the host machine's real disks; run it on your own system |
lsblk | Filesystems, labels and UUIDs | lists the host machine's real disks; run it on your own system |
lsblk | Choose the columns | lists the host machine's real disks; run it on your own system |
lsblk | Machine-readable output for scripts | lists the host machine's real disks; run it on your own system |
mount | Mount a disk partition | needs root and a real disk; the sandbox has neither |
mount | Mount read-only and without executables | needs root and a real disk |
mount | Mount a disk image or ISO file | needs root and loop devices, which the sandbox does not provide |
mount | A filesystem in memory | needs root (CAP_SYS_ADMIN), which the sandbox does not grant |
mount | Make a directory appear in a second place | needs root (CAP_SYS_ADMIN) |
systemctl | Check whether a service is running | needs a running systemd; not available in the build sandbox |
systemctl | Start, stop or restart a service | needs a running systemd and root; not available in the build sandbox |
systemctl | Reload configuration without a restart | needs a running systemd and root; not available in the build sandbox |
systemctl | Start a service now and at every boot | needs a running systemd and root; not available in the build sandbox |
systemctl | Stop a service and keep it from starting at boot | needs a running systemd and root; not available in the build sandbox |
systemctl | Test a service's state in a script | needs a running systemd; not available in the build sandbox |
systemctl | List units that have failed | needs a running systemd; not available in the build sandbox |
systemctl | List running services | needs a running systemd; not available in the build sandbox |
systemctl | Read a unit's definition | needs a running systemd; not available in the build sandbox |
systemctl | Override settings without touching the package file | needs a running systemd, root and an interactive editor; not available in the build sandbox |
systemctl | Manage your own services without root | needs a running systemd user manager; not available in the build sandbox |
tail | Keep following across log rotation | rename events inside the build sandbox's container filesystem are not delivered reliably, so the output would be misleading |
tee | Write a root-owned file | the sandbox has no sudo |
watch | Rerun a command every two seconds | needs an interactive terminal for its full-screen display, and runs until Ctrl-C |
The sandbox
- Image: Debian 13.7 ("trixie"), the official
debian:trixie-slimimage pinned by its digest, with every package installed from the Debian snapshot archive of 2026-10-15. Rebuilding the image installs exactly the same versions, so a change in output means a change in the example, not a silent upgrade. - User and place: each example runs as an ordinary user,
dev, in/home/dev/demo, on a host nameddemo, withLANG=C.UTF-8,TZ=UTCand an 80-column terminal width. A few examples (such aschown) run as root and say so. - Fresh every time: before each example the home directory is restored from the sample project,
/tmpis emptied and leftover processes are stopped, so no example depends on another. - No internet: the sandbox has no network except loopback. A small HTTP test server answers on
localhost:8080and an SSH server on the host aliasserver, socurl,wget,ssh,scpandrsyncexamples show real transfers. - What you see: standard output and standard error, interleaved as a terminal shows them, and the exit status when it is not 0. Output over 60 lines is cut and the page says how many lines were left out.
- Things that vary: process IDs, timings, dates and key fingerprints come from the run that built the page. File dates in the sample project are set to a few days before each run, so
ls -landfind -mtimelook as they would on a working machine.
Package versions in this run
| Package | Version |
|---|---|
bash | 5.2.37-2+b10 |
bsdextrautils | 2.41.5-0+deb13u1 |
coreutils | 9.7-3 |
curl | 8.14.1-2+deb13u7 |
dash | 0.5.12-12 |
diffutils | 1:3.10-4 |
findutils | 4.10.0-3 |
gawk | 1:5.2.1-2+b1 |
grep | 3.11-4 |
gzip | 1.13-1+deb13u1 |
iproute2 | 6.15.0-1 |
jq | 1.7.1-6+deb13u4 |
mawk | 1.3.4.20250131-1 |
openssh-client | 1:10.0p1-7+deb13u4 |
procps | 2:4.0.4-9 |
rsync | 3.5.0+ds1-0+deb13u1 |
sed | 4.9-2+deb13u1 |
tar | 1.35+dfsg-3.1 |
util-linux | 2.41.5-0+deb13u1 |
wget | 1.25.0-2 |
xz-utils | 5.8.1-1+deb13u2 |
zstd | 1.5.7+dfsg-1 |
On Debian and Ubuntu, a minimal install's awk is mawk; in this sandbox awk is GNU awk (/usr/bin/gawk), and the awk page notes where the two differ.
The sample project
Every example runs in the same small directory: logs, CSV and JSON data, some source code and a few images, all made up for this site (the IP addresses are from the ranges reserved for documentation). Seeing the same files again and again makes outputs easy to compare across commands.
~/demo ├── .env ├── access.log ├── data/ │ ├── config.json │ ├── fruits.txt │ ├── hosts.txt │ ├── inventory.tsv │ ├── numbers.txt │ ├── poem.txt │ ├── sales.csv │ ├── servers.json │ ├── settings.conf │ ├── users.csv │ └── windows.txt ├── file with spaces.txt ├── link-to-notes -> notes.txt ├── logs/ │ ├── app.log │ ├── app.log.1 │ └── error.log ├── notes.txt ├── photos/ │ ├── beach.png │ ├── forest.png │ └── IMG_2041.png ├── README.md ├── scripts/ │ ├── backup.sh │ └── greet.sh ├── src/ │ ├── app.py │ ├── lib/ │ │ └── helpers.py │ ├── main.c │ ├── Makefile │ └── util.sh └── todo.txt
Checks that stop a build
- Every example declares the exit status it should end with (0 unless the page is showing a failure). If any example ends differently, or times out, the build fails and the previous version of the site stays up.
- An example whose output was not recorded in the latest run cannot be published.
- Every internal link is checked; a broken one fails the build.
- The command-line explainer must pass its whole test corpus.
The explainer's test corpus
121 command lines, each with an expected breakdown into tokens that was checked by hand and is now fixed (command, option, option value, argument, operator, redirection, keyword, assignment, here-document, comment and the nested commands inside $( ), <( ), xargs and find -exec). This build: 121 passed, 0 failed. They cover:
- assignments: 6
- comments: 2
- keywords and compound commands: 12
- long options and values: 10
- nested commands: 11
- pipes and lists: 8
- quoting and expansion: 14
- redirections: 12
- simple options: 40
- unknown options flagged: 6
The explainer describes options only from the notes on this site's command pages. An option that is not in those notes is reported as unknown; the corpus includes such cases, so a change that starts guessing fails the tests.
How the text is written
- All explanations, pitfalls and option descriptions are written for this site. No manual or info page text is reproduced; each page names its manual section (for example
grep(1)) so you can read the original. - The GNU vs BSD and macOS notes describe systems the sandbox does not run. They are written from those systems' documentation and only where the difference is well established; they are not run.
- The
systemctlandjournalctlpages are the exception to "every example runs": systemd is not running in the sandbox, so their examples are marked as not run and show no output.
Sources and licences
- Text, examples, sample project and illustrations: written and drawn for this site.
- Outputs: produced by Debian 13.7 packages, which are free software under their own licences (GNU coreutils, findutils, grep, sed, gawk, tar and bash under the GPL; curl under the curl licence; OpenSSH under a BSD-style licence; jq under the MIT licence, among others). Showing a program's output does not copy the program.
- Manual pages: cited by name and section only.
- No third-party data, images, fonts or scripts are used.