Back to Home

Terminal Sorcery 🧙‍♂️

Mastering the command line is a superpower. Learn the spells to control your system like a true wizard.

File Manipulation

ls -lah # List all files with permissions & sizes cp -r src dst # Copy directory recursively mv file new # Rename or move file rm -rf dir # Force remove directory (Careful!) chmod +x file # Make a file executable chown user:grp file # Change ownership

System Monitoring

htop # Interactive process viewer (better than top) df -h # Disk space in human-readable format free -h # Memory usage watch -n 1 "nvidia-smi" # Monitor GPU usage in real-time

Networking & Pipes

ip a # Show IP addresses ping 1.1.1.1 # Check connectivity curl -I url # Fetch HTTP headers # The Power of Pipes (|) cat file.txt | grep "error" # Find "error" in file ps aux | grep "python" # Find running python processes

Productivity Tricks

!! # Run the last command again sudo !! # Run the last command with sudo ctrl + r # Search command history alias ll="ls -lah" # Create a shortcut

Pro Tip: Install tldr (e.g., sudo apt install tldr) for simplified man pages. Just type tldr tar to see examples!