Linux isn’t just an OS you “learn once and forget.”
For anyone in DevOps or software development, it’s the place where most real work happens — deploying apps, fixing production fires, automating processes, or chasing that mysterious “high CPU usage” alert at 2 AM.
If you’re building, shipping, or maintaining modern software, Linux is where you earn your stripes.
This isn’t a “list of commands” article. It’s a mix of must-know Linux basics, real DevOps case studies, and automation workflows you can take straight to production.
Why Linux is Non-Negotiable in DevOps & Development
- Runs the World: From AWS EC2 to Kubernetes clusters, production is overwhelmingly Linux.
- Automation-Friendly: Scripting, scheduling, and orchestration are natural fits.
- Container DNA: Docker, Podman, Kubernetes — all rooted in Linux.
- Troubleshooting Power: Nothing beats SSH + a few well-placed commands for diagnosing live issues.
1. Linux Basics You Can’t Skip
Filesystem Map in Your Head
Knowing where things live saves you time:
/etc→ configs/var→ logs, temp files/usr→ apps/home→ user data
Check a directory tree quickly:
tree /etc | less
Permissions & Ownership
You’ll deal with this daily:
chown user:group file.txt chmod 755 script.sh ls -l
Processes & Services
- See what’s running:
ps aux htop - Kill a process:
kill -9 <PID> - Restart a service:
systemctl restart nginx
2. Commands That Earn Their Keep
- Find text in files:
grep -rnw . -e "keyword" - Search by name:
find /path -name "*.log" - Check ports:
ss -tulnp - Watch logs live:
tail -f /var/log/syslog
3. Networking Skills for Real Environments
- IP and interfaces:
ip addr - Quick connectivity check:
ping google.com curl -I https://example.com - SSH into a server:
ssh user@ip
4. Automating Repetitive Tasks
Example deployment script:
#!/bin/bash echo "Pulling latest code..." git pull origin main docker compose down docker compose up -d echo "Done."
Make it executable:
chmod +x deploy.sh
5. Logs: Your Best Friend in Production
- Follow multiple logs:
multitail /var/log/syslog /var/log/nginx/access.log - Filter by date:
grep "2025-08-16" /var/log/app.log
6. Spotting Performance Issues Fast
- CPU:
top - Disk I/O:
iotop - Memory:
free -h
7. Tools That Pay Off Daily
tmux→ persistent sessionsjq→ JSON parsingfzf→ fuzzy file finderrsync→ efficient transfersdocker&kubectl→ containers & clusters
8. Security Habits You Should Already Have
- Keep packages updated:
sudo apt update && sudo apt upgrade - Block unnecessary ports with
ufw - Disable SSH root login in
/etc/ssh/sshd_config
9. Real DevOps Scenarios Where Linux Saves the Day
Scenario 1 – Kubernetes Pod Stuck Pending
- SSH into node → check disk with
df -h - Found Docker logs eating space → cleaned with:
docker system prune -af
Scenario 2 – Jenkins Build Keeps Failing
- Checked disk with
du -sh /var/jenkins_home/* - Old builds filling space → automated cleanup with:
0 3 * * * rm -rf /var/jenkins_home/workspace/*-old
Scenario 3 – API Latency Spike
- Found service hogging CPU with
top - Used
strace -p <PID>to see DB connection issues → fixed pooling
10. Linux in Cloud & Containers
- Docker logs:
docker logs -f container_name - K8s node health:
kubectl describe node node-name - Expand EC2 disk:
growpart /dev/xvda 1 resize2fs /dev/xvda1
11. Crisis Mode: When Every Second Counts
- Find large logs:
find /var/log -type f -size +100M - Restart failed service:
systemctl restart my-service - Watch memory live:
watch -n 1 free -h
FAQ
Q: How do I check which process owns a port?
sudo lsof -i :8080
Q: Best way to copy files between servers?
scp file.txt user@server:/path
Q: How to see distro version?
cat /etc/os-release
Q: Safest way to stop a process?
First:
kill <PID>
Only if needed:
kill -9 <PID>
Q: How to schedule recurring tasks?
crontab -e
Example:
0 2 * * * /home/user/backup.sh
If you work in DevOps or development, Linux is your common ground, the one skill that pays off in every stack, every environment, every crisis.
Master it beyond just the commands. Learn why things break, how to spot it fast, and how to fix it without panic. That’s what separates button-pushers from engineers.






