You don’t need to be a sysadmin to work comfortably in Linux. But as a developer, knowing the right 20% of commands will save you hours of clicking and debugging.
Let’s cut the fluff. Here are the essential Linux commands I use daily.
Navigation & Inspection
bash
pwd # Where am I?
ls -la # List all files (including hidden) with details
cd project/ # Move into directory
cd .. # Go back one level
cd ~ # Go home
Dev tip: Use ls -la | grep keyword to filter files.
File Operations (You’ll use these constantly)
bash
touch index.js # Create empty file
cat file.txt # Print entire file to terminal
head -20 app.log # First 20 lines of log
tail -f app.log # Follow live log output (critical for debugging)
cp -r src/ backup/ # Copy folder recursively
mv oldname.js newname.js # Rename or move
rm file.txt # Delete file (careful!)
rm -rf node_modules/ # Delete folder (double careful!)
Process Management
bash
ps aux # List all running processes
ps aux | grep node # Find Node processes
kill -9 1234 #…