Basic Linux Commands Cheat Sheet

Paste Content

pwd                 # Show current directory (e.g. /home/user)
ls -la              # List files and directories (e.g. ls -la)
cd                  # Change directory (e.g. cd Documents)
mkdir folder        # Create directory (e.g. mkdir project)
touch file.txt      # Create file (e.g. touch notes.txt)
cat file.txt        # View file (e.g. cat notes.txt)
nano file.txt       # Edit file (e.g. nano notes.txt)
cp src dst          # Copy file/folder (e.g. cp file.txt backup.txt)
mv src dst          # Move or rename (e.g. mv file.txt newfile.txt)
rm file             # Delete file (e.g. rm file.txt)
grep text file      # Search text (e.g. grep "error" log.txt)
find . -name file   # Find file (e.g. find . -name "*.log")
chmod +x script.sh  # Make executable (e.g. chmod +x install.sh)
tail -f log.log     # Watch log file (e.g. tail -f app.log)
history             # Command history (e.g. history)
clear               # Clear terminal (e.g. clear)

Comments

Anonymous 5/31/2026, 2:30:19 PM

gg