The Linux Command Line Cheat Sheet for IT Pros Who Actually Want to Get Stuff Done

So, you’ve found yourself staring at a blinking cursor on a Linux terminal, wondering if today’s the day you finally break production. Good news: Linux isn’t out to get you—at least, not on purpose.

The Linux Command Line Cheat Sheet for IT Pros Who Actually Want to Get Stuff Done
Photo by Athul Cyriac Ajay / Unsplash

So, you’ve found yourself staring at a blinking cursor on a Linux terminal, wondering if today’s the day you finally break production. Good news: Linux isn’t out to get you—at least, not on purpose. Whether you're troubleshooting, deploying, or just trying to impress your peers, these essential Linux commands will make you the IT wizard you were meant to be.

Let’s dive in. 🏊


📂 Navigating the Filesystem Like a Pro

ls – List directory contents

Why? Need to see what’s in a folder? ls is your go-to.

  • ls -l → Long format, shows permissions, ownership, and file size.
  • ls -a → Lists hidden files (because .config isn’t playing hide-and-seek for fun).
  • ls -lah → Because human-readable file sizes are easier than counting bytes in your head.

Caveat: Symlinks might trip you up. Use ls -l to check where they lead.

cd – Change directory

Why? Move between folders like a ninja.

  • cd /etc → Take me to the configs.
  • cd ~ → Back home, where things are safe.
  • cd - → Switch between last two directories. (Game-changer!)

Caveat: If you’re in a restricted directory, cd will simply shake its head at you.


🔎 Finding Files Without Losing Your Mind

find – Locate files by name, type, or date

Why? Because you don’t remember where you saved that .conf file.

  • find / -name myfile.txt → Searches from root, might be slow.
  • find . -type f -iname "*.log" → Case-insensitive log search.
  • find /var/log -mtime -1 → Logs modified in the last 24 hours.

Caveat: Running find / as root will flood your screen with permission errors. Use 2>/dev/null to silence them.

grep – Search inside files

Why? Because manually reading logs is for rookies.

  • grep ERROR /var/log/syslog → Show lines with "ERROR".
  • grep -i "warning" file.txt → Case-insensitive search.
  • grep -r "TODO" /home/user/code → Recursively finds TODO comments in your code.

Caveat: Grep hates binary files. Use grep -I to ignore them.


🚀 User & Process Management – Because the Server Won’t Fix Itself

top & htop – Monitor system processes

Why? Spot memory hogs before they crash your server.

  • top → Displays real-time CPU/memory usage.
  • htop → A better, colorized top. Install it. Now.

Caveat: htop isn’t installed by default on every distro, but it should be.

kill & pkill – Terminate processes

Why? Because sometimes, things need to be stopped. Forcefully.

  • kill 1234 → Terminates process ID 1234.
  • pkill -9 firefox → Ends all Firefox instances, no questions asked.

Caveat: kill -9 is the nuclear option. Always try a graceful kill first.


🌍 Networking – The Internet Exists, Use It

ping – Check connectivity

Why? Because “is the server down?” is never a yes/no question.

  • ping google.com → Confirms if Google is still alive.
  • ping -c 4 8.8.8.8 → Limits output to 4 attempts.

Caveat: ICMP might be blocked on some networks. If it fails, don’t panic yet.

curl & wget – Fetch the internet

Why? Because sometimes, a browser just won’t cut it.

  • curl ifconfig.me → Shows your public IP.
  • wget -O file.zip http://example.com/file.zip → Download with custom filename.

Caveat: Curl has a thousand options. Try curl -L if redirects are breaking your download.


💾 File Manipulation – Because Copy-Paste Isn’t Always an Option

cp – Copy files

Why? Because CTRL+C doesn’t work in a terminal.

  • cp file.txt /backup/ → Copies file to /backup/.
  • cp -r folder /backup/ → Copies folder and its contents.

Caveat: cp doesn’t merge directories. For that, use rsync.

mv – Move or rename files

Why? Because organizing files is a full-time job.

  • mv oldname.txt newname.txt → Rename file.
  • mv file.txt /backup/ → Move file to another location.

Caveat: mv will overwrite existing files without warning. Use mv -i for safety.


🛠️ System Administration – The Real Power Moves

chmod & chown – Manage file permissions

Why? Because Linux won’t let just anyone edit system files.

  • chmod +x script.sh → Make a script executable.
  • chown user:group file.txt → Change file owner.

Caveat: chmod 777 is lazy and dangerous. Don’t do it.

df & du – Check disk usage

Why? Because running out of disk space is never fun.

  • df -h → Shows disk usage in human-readable format.
  • du -sh /var/log/ → Shows total size of a directory.

Caveat: du can be slow on large directories. Use du -sh * | sort -h for an ordered breakdown.


🏁 Wrapping Up

Linux is powerful, but only if you know what you’re doing. These commands won’t make you an expert overnight, but they’ll save your bacon when it counts. Learn them. Use them. Automate where you can. And most importantly—stay curious. 🧐