Let’s face it: if you're writing code and not using Linux (or at least the terminal), you’re missing out on half the developer experience — the half where you actually feel like a hacker from a ‘90s movie.
Whether you’re deploying, debugging, or just flexing in front of your coworkers, these Linux commands are essential tools in your utility belt.
🧠 pwd — Print Working Directory
Translation: “Where the heck am I?”
pwdThis one tells you your current location in the filesystem jungle. Like GPS, but for your terminal.
📂 ls — List Directory Contents
Translation: “Show me what’s in this folder.”
ls
ls -laAdd -l for detailed info and -a to uncover hidden treasures (.env, .git, .Iforgotaboutthis).
🚪 cd — Change Directory
Translation: “Get me out of here.”
cd /path/to/destination
cd ~ # Go to home
cd - # Go backEssential for moving around like a pro instead of exiting the terminal and opening File Explorer like a peasant.
🔥 rm — Remove Files or Directories
Translation: “Delete like you mean it.”
rm file.txt
rm -r folder/
rm -rf / # Don’t. Ever.The -r flag removes folders recursively. -f makes it ruthless. Combining both is like giving your terminal a bazooka.
🧹 mkdir & rmdir — Make / Remove Directory
mkdir new_folder
rmdir old_folderSimple yet essential. mkdir -p even creates nested directories like a boss:
mkdir -p projects/nextjs/my-awesome-app📝 touch — Create an Empty File
touch newfile.txtNo need to open VS Code just to create a file. touch and go!
🔍 grep — Search Through Files
Translation: “Ctrl + F for the terminal.”
grep 'TODO' *.jsSearch for specific text patterns. Super useful when your codebase has more bugs than features.
🪓 chmod — Change File Permissions
chmod +x script.shGrants execution rights. Because not all heroes wear capes; some just need the right permissions.
🏃 ./ — Run Executables
./myscript.shIf you wrote a script but the terminal says “permission denied,” check your chmod (see above). Once executable, this is how you run it.
🦸 sudo — SuperUser Do
Translation: “I know what I’m doing... probably.”
sudo apt-get updateGives you superpowers. Use wisely, or you might brick your OS and end up spending the weekend reinstalling Linux.
🌐 curl — Transfer Data from URLs
curl https://api.example.com/dataDownload files, test APIs, or pretend you're working on your terminal when you're actually sending cat GIFs.
💣 kill & killall — Stop Processes
kill
killall nodeWhen Ctrl + C just isn’t enough, kill is the polite way to ask processes to die. killall... well, does what the name says.
🧪 top / htop — Monitor Processes
top
htopReal-time view of CPU and memory usage. htop is the cool, colorful cousin of top. Install it, thank me later.
📦 tar — Archive and Extract Files
tar -czvf archive.tar.gz folder/
tar -xzvf archive.tar.gzBecause zipping and unzipping files shouldn’t require dragging anything.
🧾 man — Manual Pages
man lsLost? Confused? Broken? Type man + command and let the terminal's ancient wisdom guide you.
💡 Final Thoughts
Learning Linux commands is like learning to cook. At first, you’ll burn a lot of files (rm -rf) and confuse cd with mkdir, but once you’re comfortable, you’ll be able to whip up deployments, debug servers, and automate tasks like a chef plating Michelin-star code.
So, stop Googling “How to delete file Linux” and start memorizing the essentials.