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
Command What it does
ls List directory contents
pwd Show current directory path
cd Change directory
locate Search files by name
find Search files and directories
mkdir Create a directory
rmdir Remove an empty directory
rm Delete files or directories
cp Copy files or directories
mv Move or rename files
touch Create an empty file
file Show file type
zip Compress files into ZIP archive
unzip Extract ZIP archive
tar Archive files and directories
nano Edit files with Nano
vi Edit files with Vi
jed Edit files with Jed
cat Display file content
grep Search text patterns in files
sed Replace or modify text patterns
head Show first lines of a file
tail Show last lines of a file
awk Process and analyze text
sort Sort file content
cut Extract sections of text
diff Compare two files
tee Output to terminal and file
sudo Run command as administrator
su Switch user account
whoami Show current user
chmod Change file permissions
chown Change file ownership
useradd Create new user
userdel Delete user account
passwd Set or change password
df Show disk space usage
du Show directory size
top Display running processes
htop Interactive process viewer
ps Show process snapshot
uname Show system information
hostname Show or set hostname
time Measure command execution time
systemctl Manage system services
watch Run command repeatedly
jobs List shell background jobs
kill Terminate a process
shutdown Shut down or restart system
ping Test network connectivity
wget Download files from the web
curl Transfer data via URL
scp Copy files over SSH
rsync Sync files between systems
ip Manage network settings
netstat Show network connections
traceroute Trace network packet path
nslookup Query DNS records
dig Detailed DNS lookup
history Show command history
man Show command manual
echo Print text to terminal
ln Create file links
alias Create command shortcut
unalias Remove command shortcut
cal Display calendar
apt Manage packages (Debian-based)
dnf Manage packages (RHEL-based) 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, automati...See more