ls List directory contents
ls -la List all files with details (including hidden)
cd <dir> Change directory
pwd Print current working directory
mkdir <dir> Create a directory
mkdir -p a/b/c Create nested directories
rm <file> Remove a file
rm -rf <dir> Remove directory recursively (careful!)
cp <src> <dst> Copy file
cp -r <src> <dst> Copy directory recursively
mv <src> <dst> Move or rename file/directory
touch <file> Create empty file or update timestamp
cat <file> Display file contents
head -n 20 <file> Show first 20 lines
tail -n 20 <file> Show last 20 lines
tail -f <file> Follow file output in real time
ln -s <target> <link> Create symbolic link
stat <file> Show detailed file information
chmod 755 <file> Set permissions (rwxr-xr-x)
chmod +x <file> Make file executable
chmod -R 644 <dir> Set permissions recursively
chown user:group <file> Change file owner and group
chown -R user:group <dir> Change owner recursively
umask 022 Set default permission mask
find . -name "*.txt" Find files by name pattern
find . -type f -mtime -7 Find files modified in last 7 days
find . -size +100M Find files larger than 100MB
grep "pattern" <file> Search for pattern in file
grep -r "pattern" <dir> Search recursively in directory
grep -i "pattern" <file> Case-insensitive search
grep -n "pattern" <file> Search with line numbers
which <cmd> Show full path of a command
locate <file> Find file by name (uses database)
curl <url> Transfer data from URL
curl -O <url> Download file from URL
wget <url> Download file
ping <host> Test network connectivity
ip addr Show network interfaces and IPs
ss -tuln Show listening ports
netstat -tuln Show listening ports (legacy)
scp <file> user@host:<path> Copy file to remote host via SSH
ssh user@host Connect to remote host via SSH
rsync -avz <src> <dst> Sync files/directories efficiently
ps aux List all running processes
ps aux | grep <name> Find process by name
top Interactive process monitor
htop Better interactive process monitor
kill <pid> Send SIGTERM to process
kill -9 <pid> Force kill process (SIGKILL)
killall <name> Kill all processes by name
bg Resume suspended job in background
fg Bring background job to foreground
nohup <cmd> & Run command immune to hangups
df -h Show disk space usage (human-readable)
du -sh <dir> Show directory size
du -sh * | sort -rh List items by size (largest first)
mount Show mounted filesystems
lsblk List block devices
fdisk -l List disk partitions
uname -a Show system information
hostname Show or set system hostname
uptime Show how long system has been running
whoami Show current username
date Show current date and time
cal Show calendar
free -h Show memory usage
systemctl status <service> Check service status
systemctl restart <service> Restart a service
journalctl -u <service> -f Follow service logs
history Show command history
alias ll='ls -la' Create a command alias
env Show environment variables
export VAR=value Set environment variable
tar czf archive.tar.gz <dir> Create gzip compressed archive
tar xzf archive.tar.gz Extract gzip archive
tar xjf archive.tar.bz2 Extract bzip2 archive
zip -r archive.zip <dir> Create zip archive
unzip archive.zip Extract zip archive
gzip <file> Compress file with gzip
gunzip <file>.gz Decompress gzip file
Linux Commands Cheatsheet
A comprehensive, searchable reference of essential Linux commands. Filter by category (files, permissions, search, network, processes, disk, system, archives) or search by keyword. Copy any command with one click.
About this cheatsheet
This Linux cheatsheet covers the most commonly used terminal commands organized by task category.
- 75+ essential Linux commands
- Filter by category (Files, Permissions, Search, Network, Processes, Disk, System, Archives)
- Full-text search across commands and descriptions
- One-click copy to clipboard
- Works offline — all data is in the page
100% free. No signup required. No data collected or sent anywhere.