LESS GUESSING. MORE UNDERSTANDING.

Know what you're
about to type.

Small, practical explanations for shell commands.
Useful examples. Clear options. The right implementation.

Explore the reference
YOUR TERMINAL, EXPLAINED

$ explain grep

Find lines of text that match a pattern.

One command, step by step.

grep -n -i 'error' app.log

Print each matching line with its line number. This helps you locate a result in the original file.

ONE MARKDOWN SOURCE · WEB + CLI

NEW TO THE TERMINAL? START HERE

Learn the ideas behind the commands.

Plain-language guides with pictures and tables: what a terminal and a shell are, how a command becomes a result, and why one tool has many versions.

START WITH A USE CASE

194 commands

SMALL REFERENCE. USEFUL DETAILS.

arch

Print the machine hardware name.

macOS / Apple / BusyBox

awk

Process text line by line with patterns and actions.

GNU / macOS / Apple / BusyBox / mawk

Print the file name part of a path, with or without its extension.

GNU / macOS / Apple / BusyBox

cat

Print files, or standard input, one after another.

GNU / macOS / Apple / BusyBox

cksum

Print a CRC checksum and the byte count of files.

GNU / macOS / Apple / BusyBox

comm

Compare two sorted files and show lines unique to each or shared.

GNU / macOS / Apple / BusyBox

csplit

Cut a file into pieces at lines that match a pattern or a line number.

GNU / macOS / Apple

date

Print the date and time in a chosen format.

GNU / macOS / Apple / BusyBox

dd

Copy bytes from an input to an output, with control over block sizes and conversion.

GNU / macOS / Apple / BusyBox

df

Show free and used space on mounted file systems.

GNU / macOS / Apple / BusyBox

du

Show how much disk space files and folders use.

GNU / macOS / Apple / BusyBox

expr

Evaluate an expression: arithmetic, comparisons and text matching.

GNU / macOS / Apple / BusyBox

gh

Work with GitHub issues, pull requests and repositories from the terminal.

Upstream project

hostid

Print a numeric identifier for this host.

GNU / BusyBox

id

Print the user and group IDs and names of a user.

GNU / macOS / Apple / BusyBox

link

Make a hard link with the plain two-argument form.

GNU / macOS / Apple / BusyBox

ln

Make hard links and symbolic links to files.

GNU / macOS / Apple / BusyBox

mkfifo

Create a named pipe, a file that connects two programs.

GNU / macOS / Apple / BusyBox

nice

Run a command with a lower or higher scheduling priority.

GNU / macOS / Apple / BusyBox

nl

Number the lines of a file.

GNU / macOS / Apple / BusyBox

nproc

Print the number of processing units available.

GNU / BusyBox

od

Dump the bytes of a file as octal, hexadecimal, decimal or characters.

GNU / macOS / Apple / BusyBox

paste

Join lines from several files side by side, or join one file's lines into one.

GNU / macOS / Apple / BusyBox

pgrep

Find processes by name or by their command line and print their numbers.

macOS / Apple / procps-ng / BusyBox

pinky

Show a short report on logged-in users, in the style of the finger command.

GNU

pkill

Send a signal to processes found by name or by their command line.

macOS / Apple / procps-ng / BusyBox

printf

Print text using a format string, with exact control over newlines and escapes.

Bash builtin / GNU / macOS / Apple / BusyBox

ps

List the processes that are running.

macOS / Apple / procps-ng / BusyBox

ptx

Make a permuted index, listing each word with the text around it.

GNU

Print the absolute, fully resolved form of a path.

GNU / macOS / Apple / BusyBox

rg

Search the files under a folder for a pattern, fast, ignoring what .gitignore ignores.

Upstream project

shuf

Shuffle lines into a random order, or pick random lines.

GNU / BusyBox

ssh

Log in to another computer, or run a command on it, over an encrypted connection.

Upstream project

stat

Show file size, permissions, type and timestamps.

GNU / macOS / Apple / BusyBox

sum

Print an old-style checksum and block count of files.

GNU / macOS / Apple / BusyBox

tac

Print the lines of a file in reverse order.

GNU / BusyBox

tail

Print the last lines or bytes of files, or follow a growing file.

GNU / macOS / Apple / BusyBox

tee

Copy what comes in to a file and to the screen at the same time.

GNU / macOS / Apple / BusyBox

touch

Create empty files or change file timestamps.

GNU / macOS / Apple / BusyBox

Set a file to an exact size, shrinking or extending it.

GNU / macOS / Apple / BusyBox

tty

Print the name of the terminal connected to standard input.

GNU / macOS / Apple / BusyBox

uname

Print the name and version of the operating system and the machine.

GNU / macOS / Apple / BusyBox

unlink

Remove one file with the plain one-argument form.

GNU / macOS / Apple / BusyBox

uptime

Show how long the system has been running and the load.

GNU / macOS / Apple / BusyBox

who

Show who is logged in, and from which terminal.

GNU / macOS / Apple / BusyBox