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.
Just need to get something done?
Task-shaped guides that open with the command and explain it afterwards.
See how much space is left, and find out what is using it.
Extract a .tar.gz archiveUnpack tar.gz, tar.bz2, tar.xz and zip archives from the command line.
Free a port that is already in useFind which process holds a port and stop it cleanly.
Find and replace text in filesReplace text in one file or across a whole project, safely.
Make a script executableGive a script permission to run, and understand why it needs it.
Search text inside filesFind which files contain a word, and exactly where.
Something broken right now?
One page per error message: what it means, the causes ranked by how often they are really the culprit, and the command that fixes each one.
SSH rejected your login because no key you offered was accepted by the server.
bash: command: command not foundThe shell searched every directory in your PATH and found no executable with that name.
No such file or directoryThe path you gave does not resolve — but often the missing part is not the one you think.
Permission deniedThe path resolves fine — the system simply will not let you do that with it.
No space left on deviceA filesystem is full — confirm which one, and whether you ran out of bytes or inodes.
bind: Address already in useSomething is already listening on the port your program wants.
Which tool should I use?
Side-by-side comparisons of the tools people confuse, each ending in a verdict rather than an "it depends".
Both copy files over SSH. rsync sends only what changed; scp sends everything, every time.
curl vs wgetcurl is an HTTP client for talking to services; wget is a downloader for retrieving files.
sed vs awksed edits lines; awk understands columns. Substitution is sed, computation is awk.
symbolic link vs hard linkA symlink stores a path and can break; a hard link is a second real name for the same file.
grep vs ripgrep (rg)grep is everywhere; ripgrep is dramatically faster on code and respects .gitignore by default.
tar.gz vs ziptar.gz compresses better and preserves Unix permissions; zip opens with a double click on any system.
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.