Linux Command Reference

Practical guides to the commands you'll use every day. Each one explains the syntax, the options that matter, real examples with context — and includes a live terminal so you can try the command as you read.

ls

List the contents of a directory, with options for hidden files, long format, sorting and more.

cd

Move between directories: absolute and relative paths, home shortcut, and jumping back.

pwd

Show the absolute path of the directory you are currently in.

mkdir

Create one or many directories, including whole nested paths with -p.

touch

Create empty files instantly, or update the timestamps of existing ones.

rm

Delete files and directories — and understand -r, -f and why there is no trash bin.

cp

Copy files and whole directory trees, preserving attributes when needed.

mv

Move files between directories and rename them — the same operation in Linux.

cat

Print file contents, number lines, and join multiple files together.

grep

Find lines matching a pattern in files or piped input — the workhorse of text search.

find

Locate files anywhere in a directory tree by name, type, size, date — and act on them.

chmod

Change file permissions with numeric (755, 644) and symbolic (u+x) modes — clearly explained.

echo

Print text and variables, and write or append to files with > and >>.

head & tail

Print the first or last lines of a file — including live log following with tail -f.

tar

Create and extract archives: tar.gz, tar.bz2 — with the flag combinations finally explained.

ssh

Log into remote machines, run remote commands, use keys instead of passwords, and tunnel ports.

curl

Download files, test APIs, send POST requests with JSON, and inspect headers.

wget

Download files and whole sites, resume interrupted transfers, and fetch in the background.

ps

See what is running, find a process ID, and combine with grep to hunt down a program.

kill

Terminate processes politely or forcibly — and understand what -9 really does.

df & du

See free space per filesystem and find what is eating your disk, directory by directory.

ln

Make one file reachable from several paths — and understand symlinks vs hard links.

sed

Stream-edit text: substitute, delete lines, and edit files in place with -i.

awk

Pull columns out of any output, filter rows, and compute sums — the shell's spreadsheet.

cut

Slice fields or character ranges out of each line — quick column extraction for delimited data.

xargs

Turn a list of items into command arguments — the glue between pipelines and commands.

chown

Assign files to users and groups — the other half of Linux permissions.

history

List, search and re-run previous commands — plus Ctrl+R, !! and the tricks that save hours.

ping

Check whether a host is reachable and measure round-trip latency.

ip

The modern tool for addresses, links and routes — replacing ifconfig and route.

ss

See listening ports, active connections and which process owns each socket.

dig

Ask DNS questions directly: A, MX, TXT records, and which server answered.

rsync

Sync directories locally or over SSH, transferring only what changed.

scp

The quickest way to move a file to or from a remote machine.

top & htop

The live dashboard: CPU, memory, load average and the processes consuming them.

free

RAM and swap at a glance — and how to read "available" correctly.

systemctl

Start, stop, enable and inspect services — the control panel of modern Linux.

journalctl

Query the system journal: by service, time window, priority — and follow live.

sudo & su

Temporary privilege, audited — and why sudo won everywhere.

apt

Search, install, upgrade and remove packages — plus the dnf/pacman equivalents.

crontab

Run commands on a schedule — and read the five-field syntax fluently.

tee

Split a stream: watch output live while saving a copy — and write files with sudo.

tr

Character-level transforms in pipelines: case, delete, squeeze, sanitize.

uniq

Deduplicate adjacent lines and count occurrences — sort's inseparable partner.

diff

See exactly what changed between two files or trees — the language of patches.

less

The standard pager: scroll, search, jump — and follow logs from inside.

gzip & zip

Single-file compression (gzip family) vs portable archives (zip) — and when each.

env & export

How configuration flows into processes — PATH, export, and why edits "don't stick".

alias

Name your habits: shortcuts, safer defaults, and where to keep them.

jobs, & and nohup

Run things in the background, juggle them, and keep them alive after logout.

sha256sum & md5sum

Fingerprint files, verify downloads, and prove two files are identical.

which & type

Which binary actually runs when you type a name — and unmask aliases.

Unfamiliar with a word rather than a command — inode, symlink, stdout, PATH? The glossary explains the concepts these guides assume.
New to the terminal entirely? Start with the interactive course — it walks you through these commands step by step and checks your answers as you type.