DevOps Commands Cheat Sheet: Your Ultimate Quick Reference

 


DevOps unites software development and operations, emphasizing automation, collaboration, and efficiency. Whether you’re deploying servers, managing code, building containers, or orchestrating cloud infrastructure, mastering key command-line tools is essential. This cheat sheet distills the most important commands for Linux, Git, Docker, Kubernetes, Helm, and Terraform—helping you work smarter and troubleshoot faster.

Linux Essentials: The Swiss Army Knife for DevOps

Basic Linux Commands

  • pwd, ls, cd, touch, mkdir: Navigate and manage files/directories.

  • cp, mv, rm, cat: Copy, move, delete, and view files.

  • chmod, chown, grep, find: Set permissions, change ownership, search files.

System Monitoring and Networking

  • top, htop, ps, vmstat: Monitor system performance and processes.

  • ping, wget, curl, ssh: Check connectivity, download files, and access servers.

  • df -h, du, lsof, iotop: Disk usage, directory size, open files, and I/O monitoring.

Automation & Package Management

  • cron, crontab, at, alias: Schedule tasks and create command shortcuts.

  • apt, yum/dnf, snap, rpm: Install and manage packages across distributions.

Basic Git Commands: Your Code Time Machine

  • git init, git clone: Initialize and copy repositories.

  • git status, git add, git commit: Check status, stage, and commit changes.

  • git log, git diff, git show: Inspect history and differences.

  • git branch, git checkout, git merge, git rebase: Branch management and integration.

  • git pull, git push, git fetch: Sync with remote repositories.

  • git stash, git clean: Save work-in-progress and tidy your workspace.

  • Advanced: git bisect, git blame, git reflog: Debugging and deep repository introspection.

Docker: Packaging Apps for Any Environment

Everyday Docker Commands

  • docker pull, docker images, docker run: Download images and start containers.

  • docker ps, docker stop/start, docker rm/rmi: Manage containers and images.

Intermediate & Advanced

  • docker build, docker commit, docker logs, docker exec: Build images, inspect, debug.

  • docker network, docker volume, docker-compose: Orchestrate complex apps.

  • docker save/load, docker export/import, docker system prune: Manage storage and backups.

  • docker swarm, docker service, docker stack: Native orchestration and scaling.

Kubernetes (kubectl): Orchestrating Your Container Army

  • kubectl get nodes/pods/services: List cluster resources.

  • kubectl describe/ logs: Dive into pod details and logs.

  • kubectl apply/delete/scale/expose: Create, remove, scale, and expose workloads with YAML.

  • kubectl exec/port-forward: Shell access and networking to pods.

  • kubectl rollout, kubectl top, kubectl drain, kubectl taint: Deploy, monitor, and tune nodes.

  • kubectl config, kubectl namespace, kubectl patch: Configurations, environments, and resource updates.

  • Advanced: kubectl autoscale, kubectl get ingress, kubectl get crds: Autoscaling, traffic, and custom resources.

Helm: Kubernetes Package Management Made Easy

  • helm repo add/update/list: Manage chart repositories.

  • helm search repo, helm install/upgrade/uninstall: Discover, deploy, and manage charts.

  • helm list/status, helm history/rollback: Track deployments and roll back quickly.

  • helm get values/all, helm install --set --values: Custom configuration.

  • Debug & Develop: helm lint, helm template --debug, helm dependency update/list/build.

Terraform: Infrastructure as Code Powerhouse

  • terraform init, terraform validate, terraform plan/apply/destroy: Setup, validate, preview, and apply/destroy cloud infrastructure.

  • terraform show/output/state/graph: Inspect configuration, outputs, and dependencies.

  • terraform taint/untaint: Force recreation of resources.

  • terraform import, terraform providers, terraform workspace: Import resources, manage provider plugins, and separate environments.

  • Advanced state/file management: terraform state mv/rm, terraform backend, terraform login.

Why Use This Cheat Sheet?

  • Reduce cognitive overload: No need to memorize every flag—just glance at this guide!

  • Speed up troubleshooting: Jump straight to the commands you need when under pressure.

  • Accelerate onboarding: Great for beginners and as a refresher for seasoned pros.

Bookmark, share, and revisit this page to streamline your DevOps muscle memory. Mastering these commands empowers you to build, ship, and maintain cloud-native applications efficiently and confidently.


READ DevOps Commands Cheat Sheet FULL PDF


Comments

Popular posts from this blog

DevOps Learning Roadmap Beginner to Advanced

What is the Difference Between K3s and K3d

Lightweight Kubernetes Options for local development on an Ubuntu machine