Free · No signup · Runs in your browser
Learn Linux commands
by actually typing them.
Reading about the terminal doesn't teach the terminal. shell.trainer gives you a real interactive shell in your browser, a guided course that checks every command you run, and a reference with the examples you'll actually use.
Try it right now
This is a live terminal with its own filesystem. Type ls, cd documents or help:
Command reference
Every guide includes syntax, an options table, real-world examples and an embedded terminal to practice in.
List the contents of a directory, with options for hidden files, long format, sorting and more.
cdMove between directories: absolute and relative paths, home shortcut, and jumping back.
pwdShow the absolute path of the directory you are currently in.
mkdirCreate one or many directories, including whole nested paths with -p.
touchCreate empty files instantly, or update the timestamps of existing ones.
rmDelete files and directories — and understand -r, -f and why there is no trash bin.
cpCopy files and whole directory trees, preserving attributes when needed.
mvMove files between directories and rename them — the same operation in Linux.
catPrint file contents, number lines, and join multiple files together.
grepFind lines matching a pattern in files or piped input — the workhorse of text search.
findLocate files anywhere in a directory tree by name, type, size, date — and act on them.
chmodChange file permissions with numeric (755, 644) and symbolic (u+x) modes — clearly explained.
echoPrint text and variables, and write or append to files with > and >>.
head & tailPrint the first or last lines of a file — including live log following with tail -f.
tarCreate and extract archives: tar.gz, tar.bz2 — with the flag combinations finally explained.
sshLog into remote machines, run remote commands, use keys instead of passwords, and tunnel ports.
curlDownload files, test APIs, send POST requests with JSON, and inspect headers.
wgetDownload files and whole sites, resume interrupted transfers, and fetch in the background.
psSee what is running, find a process ID, and combine with grep to hunt down a program.
killTerminate processes politely or forcibly — and understand what -9 really does.
df & duSee free space per filesystem and find what is eating your disk, directory by directory.
lnMake one file reachable from several paths — and understand symlinks vs hard links.
sedStream-edit text: substitute, delete lines, and edit files in place with -i.
awkPull columns out of any output, filter rows, and compute sums — the shell's spreadsheet.
cutSlice fields or character ranges out of each line — quick column extraction for delimited data.
xargsTurn a list of items into command arguments — the glue between pipelines and commands.
chownAssign files to users and groups — the other half of Linux permissions.
historyList, search and re-run previous commands — plus Ctrl+R, !! and the tricks that save hours.
pingCheck whether a host is reachable and measure round-trip latency.
ipThe modern tool for addresses, links and routes — replacing ifconfig and route.
ssSee listening ports, active connections and which process owns each socket.
digAsk DNS questions directly: A, MX, TXT records, and which server answered.
rsyncSync directories locally or over SSH, transferring only what changed.
scpThe quickest way to move a file to or from a remote machine.
top & htopThe live dashboard: CPU, memory, load average and the processes consuming them.
freeRAM and swap at a glance — and how to read "available" correctly.
systemctlStart, stop, enable and inspect services — the control panel of modern Linux.
journalctlQuery the system journal: by service, time window, priority — and follow live.
sudo & suTemporary privilege, audited — and why sudo won everywhere.
aptSearch, install, upgrade and remove packages — plus the dnf/pacman equivalents.
crontabRun commands on a schedule — and read the five-field syntax fluently.
teeSplit a stream: watch output live while saving a copy — and write files with sudo.
trCharacter-level transforms in pipelines: case, delete, squeeze, sanitize.
uniqDeduplicate adjacent lines and count occurrences — sort's inseparable partner.
diffSee exactly what changed between two files or trees — the language of patches.
lessThe standard pager: scroll, search, jump — and follow logs from inside.
gzip & zipSingle-file compression (gzip family) vs portable archives (zip) — and when each.
env & exportHow configuration flows into processes — PATH, export, and why edits "don't stick".
aliasName your habits: shortcuts, safer defaults, and where to keep them.
jobs, & and nohupRun things in the background, juggle them, and keep them alive after logout.
sha256sum & md5sumFingerprint files, verify downloads, and prove two files are identical.
which & typeWhich binary actually runs when you type a name — and unmask aliases.
In-depth guides
The 15 commands that cover 90% of daily use, in learning order.
Permissions explainedrwxr-xr-x, 755 vs 644, chown — the model behind the numbers.
Pipes & redirectionstdin, stdout, stderr and composing commands into pipelines.
Bash scriptingVariables, conditions, loops and exit codes — your first automation.
Directory structureWhat /etc, /var, /usr and /proc are for, and where to look when things break.
The paid PDF
Take the whole reference offline
Every chapter and guide as one polished, printable PDF — and buying it funds new chapters.
See the Handbook →Why learn the Linux command line?
The terminal is the common interface behind almost everything technical: servers, containers,
CI pipelines, cloud instances, embedded devices and your own development machine. Graphical
tools come and go, but ls, grep and chmod have worked
the same way for decades and will keep working for decades more. A few hours of deliberate
practice with the core commands pays off for an entire career.
The catch is that reading about commands doesn't build the muscle memory — typing them does. That's the whole idea behind this site: every page gives you a safe sandbox where mistakes cost nothing, so you can experiment until each command feels automatic.