20 Essential DevOps Commands Every IT Professional Should Know
DevOps involves managing code, containers, infrastructure, deployments, and servers. Whether you work in development, cloud engineering, or production support, having the right commands at your fingertips can save time and simplify troubleshooting.
In this guide, let's explore some practical DevOps commands and how they are used in daily IT operations.
1. Git Commands for Code Management
Git helps developers and operations teams track code changes and collaborate efficiently.
git status
git pull origin main
git log --oneline
git branch
git stashWhen to use: Check pending changes, synchronize your local branch, review commit history, and temporarily save unfinished work.
2. Docker Commands for Containers
Docker packages applications and their dependencies into containers, making deployment more consistent across environments.
docker ps -a
docker images
docker build -t my-app .
docker logs <container>
docker compose up -dWhen to use: Inspect containers, review available images, build an application image, investigate application logs, and start services.
3. Kubernetes Commands for Cluster Monitoring
Kubernetes manages containerized applications across clusters. The kubectl command-line tool helps administrators inspect and troubleshoot workloads.
kubectl get pods -A
kubectl get svc -A
kubectl get deployments
kubectl describe pod <pod-name>
kubectl logs <pod-name>When to use: Check pod health, inspect services, review deployment status, investigate pod events, and examine application logs.
4. Terraform Commands for Infrastructure Automation
Terraform allows teams to define and manage infrastructure through configuration files.
terraform init
terraform fmt
terraform validate
terraform plan
terraform applyWhen to use: Initialize a project, format configuration, validate syntax, preview infrastructure changes, and apply approved changes.
Important: Review the execution plan and follow your organization's approval process before applying infrastructure changes.
5. Linux Commands for Production Support
Linux commands are particularly useful when investigating server performance, disk capacity, running processes, and application services.
df -h
free -h
top
systemctl status <service>
journalctl -u <service> -fWhen to use:
df -h— Identify filesystems with limited disk space.free -h— Review memory availability.top— Monitor CPU and process activity.systemctl status— Check a system service.journalctl— Examine service logs in real time.
6. Networking Commands for Troubleshooting
Network checks help determine whether a service is reachable and whether a port is listening.
ip addr show
ss -tuln
curl -I https://example.comThese commands help inspect network interfaces, identify listening ports, and check HTTP response headers from a website.
Best Practices for Using DevOps Commands
- Understand a command before running it on a production server.
- Use test environments to practise unfamiliar commands.
- Review logs and error messages before changing configurations.
- Follow change-management and access-control policies.
- Avoid running destructive commands without proper validation and approval.
Conclusion
Learning DevOps commands is a practical way to improve troubleshooting skills and understand modern deployment workflows. Start with Git and Linux fundamentals, then explore Docker, Kubernetes, and Terraform as they become relevant to your work.
Bookmark this guide for quick reference during your daily IT operations.
Which DevOps tool would you like to learn next: Docker, Kubernetes, Terraform, or Linux? Share your thoughts in the comments.
Tags: DevOps, Linux Commands, Git, Docker, Kubernetes, Terraform, IT Operations, System Administration
