most useful Linux commands for DevOps engineers

Vaibhav UpareVaibhav Upare
3 min read

๐Ÿ”ง 1. System & Process Monitoring

CommandDescription
top or htopView real-time CPU, memory, and process usage.
ps auxShow running processes with detailed info.
free -hCheck available and used memory.
df -hDisplay disk space usage.
du -sh *Show folder sizes in the current directory.
uptimeShow system load average and uptime.
vmstatMonitor memory, CPU, I/O, and system processes.

๐Ÿ“ฆ 2. Package Management

CommandDescription
apt update && apt upgrade(Debian/Ubuntu) Update and upgrade packages.
yum update or dnf update(CentOS/RHEL) Update packages.
snap install <package>Install via Snap.
dpkg -i <package.deb>Install a .deb package manually.

๐Ÿ“ 3. File & Directory Management

CommandDescription
ls -lhList files with size and permissions.
cd, pwdChange and print working directory.
cp, mv, rmCopy, move, and remove files.
find . -name "*.log"Find files recursively.
tar -czvf file.tar.gz folder/Compress files using tar + gzip.
unzip file.zipExtract zip files.

๐ŸŒ 4. Networking

CommandDescription
curl -I http://example.comCheck HTTP response headers.
ping <host>Check network connectivity.
netstat -tulpnShow open ports and listening services.
ss -tulnFaster alternative to netstat.
traceroute <host>Show network path to destination.
dig, nslookupDNS query tools.
iptables / ufwManage firewall rules.

๐Ÿ—‚ 5. Disk, Logs, and Permissions

CommandDescription
chmod, chownChange file permissions and ownership.
ls -lView file permissions.
tail -f /var/log/syslogWatch logs in real-time.
journalctl -u <service>View systemd service logs.
lsof -i :80List processes using port 80.

๐Ÿ›  6. Services and Systemd

CommandDescription
systemctl status nginxCheck service status.
systemctl start/stop/restart nginxManage service.
systemctl enable nginxEnable service at boot.
service nginx statusAlternative to systemctl.

๐Ÿ”„ 7. Users and SSH

CommandDescription
adduser <username>Add new user.
passwd <username>Set/change user password.
sudoRun command with elevated privileges.
ssh user@hostConnect to remote server.
scp file user@host:/pathSecurely copy files to/from remote servers.

โš™๏ธ 8. Scripting and Automation

CommandDescription
crontab -eSchedule recurring tasks.
bash script.shExecute shell scripts.
chmod +x script.shMake script executable.
env / export VAR=valueManage environment variables.

๐Ÿงช 9. DevOps-Specific Tools

ToolCommand
Gitgit clone, git pull, git status
Dockerdocker ps, docker exec, docker-compose up
Kuberneteskubectl get pods, kubectl logs
Ansibleansible-playbook play.yml
Terraformterraform init, terraform apply
Jenkinsjenkins-cli.jar commands
2
Subscribe to my newsletter

Read articles from Vaibhav Upare directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vaibhav Upare
Vaibhav Upare

"Passionate DevOps Engineer dedicated to crafting robust, scalable, and automated solutions for seamless software delivery. With expertise in cloud technologies, CI/CD pipelines, and infrastructure as code, I thrive on optimizing workflows and driving collaboration between development and operations teams. Let's build together for continuous innovation and efficiency."