
Photo by Gabriel Heinzer on Unsplash
Essential Linux Commands Every Developer Should Master
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?”
pwd
This 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 -la
Add -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 back
Essential 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_folder
Simple 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.txt
No 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' *.js
Search for specific text patterns. Super useful when your codebase has more bugs than features.
🪓 chmod — Change File Permissions
chmod +x script.sh
Grants execution rights. Because not all heroes wear capes; some just need the right permissions.
🏃 ./ — Run Executables
./myscript.sh
If 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 update
Gives 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/data
Download files, test APIs, or pretend you're working on your terminal when you're actually sending cat GIFs.
💣 kill & killall — Stop Processes
kill <PID> killall node
When 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 htop
Real-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.gz
Because zipping and unzipping files shouldn’t require dragging anything.
🧾 man — Manual Pages
man ls
Lost? 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.