Linux Commands Cheat Sheet

Last Updated: November 21, 2025
⏰ Interactive Tool

Build and understand cron schedules with our Cron Expression Helper

File & Directory Operations

ls
List directory contents
ls -la
List all files with details
cd /path/to/dir
Change directory
pwd
Print working directory
mkdir dirname
Create directory
rm file
Remove file
rm -r dirname
Remove directory recursively
cp source dest
Copy file
mv source dest
Move or rename file
touch filename
Create empty file

File Viewing & Editing

cat file
Display file contents
less file
View file with pagination
head file
Show first 10 lines
tail file
Show last 10 lines
tail -f file
Follow file updates
nano file
Edit file with nano
vim file
Edit file with vim

File Permissions

chmod 755 file
Change file permissions
chmod +x file
Make file executable
chown user:group file
Change file owner

Process Management

ps aux
List all processes
top
Interactive process viewer
kill PID
Terminate process by ID
killall name
Terminate process by name
bg
Resume job in background
fg
Bring job to foreground

System Information

df -h
Disk space usage
du -sh *
Directory sizes
free -h
Memory usage
uname -a
System information
whoami
Current username

Network Commands

ping host
Test connectivity
curl url
Transfer data from URL
wget url
Download file from URL
ifconfig
Network interface configuration
netstat -tuln
List open ports
💡 Pro Tip: Use tab completion to auto-complete file and directory names!
← Back to DevOps & Cloud | Browse all categories | View all cheat sheets