🐧 Top 10 Linux Commands Every DevOps Engineer Must Know

Linux is the backbone of modern DevOps and cloud infrastructure. Whether you're managing servers, writing scripts, or troubleshooting production issues, knowing your way around the terminal is essential. In this blog, we'll cover the top 10 Linux commands that every DevOps engineer should know—especially if you're starting your journey into automation, CI/CD, and infrastructure management.
1. top
– Real-Time Process Monitoring
Use top
to monitor system performance in real time. It shows CPU usage, memory usage, running processes, and system load.
top
🔧 Use Case: Quickly identify high-CPU or memory-hogging processes during server troubleshooting.
2. ps
– Process Snapshot
The ps
command provides a snapshot of all currently running processes.
ps aux | grep nginx
🔧 Use Case: Find and investigate specific running services or applications.
3. df
– Disk Usage
Check available disk space on mounted filesystems using df
.
df -h
🔧 Use Case: Monitor disk usage to prevent space-related outages.
4. du
– Directory Size
Find out how much space a directory or file is using.
du -sh /var/log
🔧 Use Case: Identify which files or directories are consuming storage.
5. grep
– Search Within Files
Grep is used to search for patterns in files or output streams.
grep "error" /var/log/syslog
🔧 Use Case: Search logs for errors, warnings, or specific events.
6. chmod
& chown
– File Permissions
Manage file permissions (chmod
) and ownership (chown
).
chmod 755 script.sh
chown user:user file.txt
🔧 Use Case: Secure files and scripts by assigning proper access rights.
7. systemctl
– Manage Services
Use systemctl
to start, stop, enable, or check the status of system services.
systemctl status nginx
systemctl restart docker
🔧 Use Case: Manage and troubleshoot services like Nginx, Docker, and others.
8. netstat
/ ss
– Network Ports & Connections
Check network connections, open ports, and listening services.
ss -tuln
🔧 Use Case: Verify whether your application is listening on the correct port.
9. tail
– View Log Files
Display the last few lines of a file. -f
keeps the output live as the file grows.
tail -f /var/log/nginx/access.log
🔧 Use Case: Real-time log monitoring during deployments or debugging.
10. crontab
– Automate Scheduled Tasks
Use crontab
to view or edit scheduled jobs.
crontab -e
🔧 Use Case: Schedule backups, health checks, or automated scripts.
🧠 Bonus Tips for DevOps Engineers
Use
alias
to shorten repetitive commands.Combine commands with
&&
,||
, and pipes|
to build powerful one-liners.Learn to use
vi
ornano
to edit config files directly on servers.
✨ Conclusion
Mastering these 10 Linux commands is a must for every DevOps engineer. They form the foundation of server management, automation scripts, and cloud infrastructure operations. Whether you're SSHing into EC2 instances or debugging a Kubernetes node, these commands will always have your back.
Subscribe to my newsletter
Read articles from Vinay Kumar Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Vinay Kumar Gupta
Vinay Kumar Gupta
"Hi, I’m Vinay Kumar Gupta, an AWS Certified Solutions Architect currently working as a Linux System Administrator at TCS in Navi Mumbai. I’m on a journey to transition into DevOps, learning and growing along the way. On this platform, I’ll be sharing my experiences, DevOps tutorials, cloud security insights, and personal learning stories. Passionate about automation, I believe in making systems more efficient and secure through smart use of technology. Let's automate and build better systems together!"