A Linux command is a text instruction entered in the terminal to make the operating system perform a specific task, such as listing files, managing users, monitoring processes, or configuring network settings. Linux commands provide direct control over the system, enabling faster execution, automation, and more precise resource management than graphical interfaces.
Linux commands fall into six main categories:
Filesystem navigation commands that move between directories and paths
File and directory management commands that create, modify, and organize files
User and permission commands that control access and ownership
Process and system monitoring commands that track performance and running services
System operation commands that manage shutdowns, reboots, and configurations
Network commands that configure connections and diagnose connectivity
Each category below includes essential commands with their syntax, commonly used options, and real-world examples, allowing quick lookup and practical application for learning, server management, or daily terminal use.
Linux commands cheat sheet
CommandWhat it does
lsList directory contents
pwdShow current directory path
cdChange directory
locateSearch files by name
findSearch files and directories
mkdirCreate a directory
rmdirRemove an empty directory
rmDelete files or directories
cpCopy files or directories
mvMove or rename files
touchCreate an empty file
fileShow file type
zipCompress files into ZIP archive
unzipExtract ZIP archive
tarArchive files and directories
nanoEdit files with Nano
viEdit files with Vi
jedEdit files with Jed
catDisplay file content
grepSearch text patterns in files
sedReplace or modify text patterns
headShow first lines of a file
tailShow last lines of a file
awkProcess and analyze text
sortSort file content
cutExtract sections of text
diffCompare two files
teeOutput to terminal and file
sudoRun command as administrator
suSwitch user account
whoamiShow current user
chmodChange file permissions
chownChange file ownership
useraddCreate new user
userdelDelete user account
passwdSet or change password
dfShow disk space usage
duShow directory size
topDisplay running processes
htopInteractive process viewer
psShow process snapshot
unameShow system information
hostnameShow or set hostname
timeMeasure command execution time
systemctlManage system services
watchRun command repeatedly
jobsList shell background jobs
killTerminate a process
shutdownShut down or restart system
pingTest network connectivity
wgetDownload files from the web
curlTransfer data via URL
scpCopy files over SSH
rsyncSync files between systems
ipManage network settings
netstatShow network connections
tracerouteTrace network packet path
nslookupQuery DNS records
digDetailed DNS lookup
historyShow command history
manShow command manual
echoPrint text to terminal
lnCreate file links
aliasCreate command shortcut
unaliasRemove command shortcut
calDisplay calendar
aptManage packages (Debian-based)
dnfManage packages (RHEL-based)
The Wall