Linux commands cheat sheet
The everyday commands, the options you actually use and examples you can copy. Type what you want to do, like extract tar.gz or kill port 8080.
- 71Commands
- 434Options explained
- 463Copy-ready examples
- 204Linked guides
Most looked up
Files & directories 10
cdChange the current working directory.6 examples cpCopy files and directories.7 examples findSearch for files by name, size, age, type or permissions and act on them.12 examples lnCreate hard and symbolic links.5 examples lsList files and directories with sizes, permissions and dates.8 examples mkdirCreate directories.5 examples mvMove or rename files and directories.6 examples pwdPrint the full path of the current directory.3 examples rmDelete files and directories.8 examples touchCreate empty files or update file timestamps.5 examples
Text processing 15
awkProcess columns of text: print fields, filter rows and do sums.8 examples catPrint files, join them together, or create small files.6 examples cutCut out columns or characters from each line.5 examples diffCompare files line by line.6 examples grepSearch text for lines that match a pattern.11 examples headShow the first lines of a file.5 examples jqRead, filter and reshape JSON on the command line.9 examples lessPage through long files and command output.5 examples sedEdit text in a stream: replace, delete or insert lines.10 examples sortSort lines of text alphabetically, numerically or by column.8 examples tailShow the last lines of a file, or follow it as it grows.7 examples teeWrite output to the screen and to files at the same time.5 examples trTranslate, squeeze or delete characters.6 examples uniqRemove or count repeated adjacent lines.4 examples wcCount lines, words and bytes.5 examples
Archives & compression 3
Disks & storage 5
ddCopy raw data between files and devices: disk images, bootable USBs, test files.5 examples dfShow free and used disk space on mounted file systems.5 examples duShow how much disk space files and directories use.5 examples lsblkList disks, partitions and where they are mounted.4 examples mountAttach file systems and disks to a directory.7 examples
Processes & services 7
journalctlRead systemd logs for services and the system.8 examples killSend a signal to a process, usually to stop it.8 examples lsofList open files and the processes that hold them, including network ports.5 examples nohupKeep a command running after you log out.4 examples psList running processes.7 examples systemctlStart, stop, enable and check systemd services.10 examples topWatch processes and CPU and memory use live.5 examples
System information 5
freeShow used and free memory and swap.4 examples hostnamectlShow or change the host name and system details.4 examples unameShow the kernel version and system architecture.5 examples uptimeShow how long the system has been running and the load average.4 examples whoamiPrint the current user name.4 examples
Users & permissions 7
chmodChange file and directory permissions.7 examples chownChange the owner and group of files.5 examples passwdChange passwords and lock or expire accounts.6 examples suSwitch to another user, usually root.4 examples sudoRun commands as root or another user.6 examples useraddCreate user accounts.7 examples usermodChange user accounts: groups, shell, home, lock.6 examples
Networking 6
digQuery DNS records.8 examples ipShow and change IP addresses, routes and network interfaces.8 examples nmapScan hosts for open ports and services.5 examples pingCheck whether a host is reachable and measure latency.5 examples ssShow open ports and network connections.5 examples sshLog in to remote servers and run commands over a secure connection.9 examples
Downloads & file transfer 4
Package management 2
Shell & scheduling 7
aliasCreate short names for long commands.5 examples crontabSchedule commands to run automatically with cron.10 examples datePrint or set the date and time, in any format.9 examples echoPrint text and variables.6 examples historyShow and reuse commands you ran before.6 examples screenKeep terminal sessions running and reattach to them later.6 examples xargsBuild and run commands from standard input.5 examples
No command matches “”. Search all articles instead →
Missing a command? Tell us · Browse all Linux command tutorials
