Free reference

Linux command cheat sheet

The Linux commands you will reach for most, grouped by the job you are doing. Each entry gives the command, a plain-English summary and a realistic example. Options follow the official manual pages, so run man followed by the command name for the full detail.

Getting around

Find out where you are and move between folders.

Files and directories

Create, copy, move, link, find and remove files and folders.

Viewing and searching text

Read files, follow logs and pick out the lines you need.

Editing text in pipelines

Transform text as it flows from one command to the next.

Permissions and ownership

Control who can read, change and run each file.

Processes

See what is running and stop, pause or reprioritise it.

Disks and storage

Check free space and see what is plugged in and mounted.

Networking

Check your connection, reach other machines and move files across.

Packages

apt is for Debian and Ubuntu; dnf is for Fedora and RHEL. Changes need sudo.

Services and logs

Manage systemd services and read system logs with journalctl.

Archives and compression

Bundle files together and shrink them for storage or sharing.

Shell shortcuts and history

Type less and recover faster in the Bash shell.

Need the permissions numbers? Try the chmod calculator or the cron explainer, and see how to set up a practice lab.