Back to Cheatsheets
Terminal Cheatsheet
Essential terminal commands and shortcuts for efficient command-line usage.
File Operations
ls -laList all files with details
cp file1 file2Copy file1 to file2
mv file1 file2Move/rename file1 to file2
rm -rf dirRemove directory recursively
chmod +x fileMake file executable
Text Processing
cat fileDisplay file contents
grep pattern fileSearch for pattern in file
sed 's/old/new/g' fileReplace text in file
awk '{print $1}' filePrint first column
sort fileSort file contents
Process Management
ps auxList all processes
kill -9 pidForce kill process
topMonitor system processes
htopInteractive process viewer
bg %1Run job in background
System Info
uname -aShow system info
df -hShow disk usage
free -hShow memory usage
uptimeShow system uptime
whoamiShow current user
Terminal Shortcuts
Ctrl + CInterrupt process
Ctrl + DEnd of file/Exit
Ctrl + ZSuspend process
Ctrl + RSearch history
Ctrl + LClear screen
Navigation
cd ~Go to home directory
cd -Go to previous directory
pushd dirSave and change directory
popdReturn to saved directory
pwdShow current directory