Docker Dockerfile
| Command | What it does |
|---|---|
| docker ps | List running containers |
| docker ps -a | List all containers, including stopped |
| docker images | List local images |
| docker build -t name:tag . | Build an image from a Dockerfile |
| docker run -d -p 8080:80 name | Run a container in the background with a port mapped |
| docker exec -it <id> sh | Open a shell inside a running container |
| docker logs -f <id> | Stream a container's logs |
| docker system prune -a | Remove unused images, containers, and networks |
| docker compose up -d | Start services defined in compose.yaml |
Kubernetes deployment.yaml
| Command | What it does |
|---|---|
| kubectl get pods -A | List pods in every namespace |
| kubectl get nodes -o wide | List cluster nodes with details |
| kubectl apply -f file.yaml | Create or update resources from a manifest |
| kubectl describe pod <name> | Show events and status for a pod |
| kubectl logs -f <pod> | Stream logs from a pod |
| kubectl exec -it <pod> -- sh | Open a shell inside a pod |
| kubectl rollout restart deploy/<name> | Restart a deployment's pods |
| kubectl scale deploy/<name> --replicas=5 | Scale a deployment |
| kubectl config use-context <ctx> | Switch cluster context |
Ansible playbook.yml
| Command | What it does |
|---|---|
| ansible all -m ping -i inventory | Check connectivity to all hosts |
| ansible-playbook site.yml | Run a playbook |
| ansible-playbook site.yml --check | Dry-run without making changes |
| ansible-playbook site.yml --limit web | Run against one host group |
| ansible-vault encrypt secrets.yml | Encrypt a file with Ansible Vault |
| ansible-galaxy install role_name | Install a role from Galaxy |
| ansible-inventory --list | Print the resolved inventory as JSON |
Terraform main.tf
| Command | What it does |
|---|---|
| terraform init | Download providers and set up the backend |
| terraform plan | Preview changes before applying |
| terraform apply | Apply changes to reach the desired state |
| terraform destroy | Tear down everything the state manages |
| terraform fmt -recursive | Auto-format .tf files |
| terraform validate | Check configuration syntax |
| terraform state list | List resources tracked in state |
| terraform import addr id | Bring an existing resource under management |
Jenkins Jenkinsfile
| Command | What it does |
|---|---|
| systemctl status jenkins | Check service status (Linux) |
| java -jar jenkins-cli.jar -s URL list-jobs | List jobs via the CLI |
| curl -X POST JENKINS_URL/job/NAME/build | Trigger a build via the REST API |
| Jenkinsfile: pipeline { agent any ... } | Minimal declarative pipeline skeleton |
| sh 'command' | Run a shell step inside a pipeline stage |
| archiveArtifacts artifacts: 'build/**' | Save build output as an artifact |
Git .gitconfig
| Command | What it does |
|---|---|
| git status | Show changed and staged files |
| git switch -c feature/x | Create and switch to a new branch |
| git add -p | Interactively stage hunks |
| git commit -m "message" | Commit staged changes |
| git rebase -i HEAD~5 | Interactively edit the last 5 commits |
| git stash / git stash pop | Shelve and restore uncommitted work |
| git log --oneline --graph --all | Compact visual history of all branches |
| git bisect start | Binary-search commits for a regression |
Nginx nginx.conf
| Command | What it does |
|---|---|
| sudo nginx -t | Test config syntax before reloading |
| sudo systemctl reload nginx | Reload config without dropping connections |
| sudo systemctl status nginx | Check service status |
| tail -f /var/log/nginx/access.log | Follow access logs |
| tail -f /var/log/nginx/error.log | Follow error logs |
| nginx -V | Show compiled-in modules and build flags |
| proxy_pass http://backend; | Forward requests to an upstream in a server block |
Prometheus prometheus.yml
| Command | What it does |
|---|---|
| up | PromQL: 1 for targets currently reachable |
| rate(http_requests_total[5m]) | Per-second request rate over 5 minutes |
| histogram_quantile(0.95, ...) | Compute the 95th percentile from a histogram |
| promtool check config prometheus.yml | Validate a config file |
| curl localhost:9090/-/reload | Hot-reload config (needs --web.enable-lifecycle) |
| curl localhost:9100/metrics | Read raw metrics from node_exporter |
Grafana dashboard.json
| Command | What it does |
|---|---|
| localhost:3000 | Default web UI address (admin/admin on first login) |
| grafana-cli plugins install <id> | Install a plugin from the catalog |
| sudo systemctl status grafana-server | Check service status |
| /etc/grafana/grafana.ini | Main server config file |
| /var/lib/grafana/grafana.db | Default SQLite store for dashboards & users |
| Dashboards > Export > Save JSON | Export a dashboard for version control |
Helm Chart.yaml
| Command | What it does |
|---|---|
| helm repo add name url | Add a chart repository |
| helm search repo keyword | Search added repositories |
| helm install release chart | Install a chart as a named release |
| helm upgrade --install release chart | Install or upgrade in one command |
| helm rollback release 1 | Roll back to a previous revision |
| helm list -A | List releases across all namespaces |
| helm uninstall release | Remove a release |
| helm template chart | Render manifests locally without installing |
AWS CLI credentials
| Command | What it does |
|---|---|
| aws configure | Set access key, secret, region, and output format |
| aws sts get-caller-identity | Confirm which identity/account you're using |
| aws s3 ls | List S3 buckets |
| aws s3 sync ./dir s3://bucket/path | Sync a local directory to S3 |
| aws ec2 describe-instances | List EC2 instances and their state |
| aws --profile name <cmd> | Run a command against a named profile |
| aws logs tail /log/group --follow | Stream CloudWatch logs |
Vault vault-config.hcl
| Command | What it does |
|---|---|
| vault server -dev | Run a throwaway dev server (never for production) |
| export VAULT_ADDR='http://127.0.0.1:8200' | Point the CLI at a Vault server |
| vault login | Authenticate the CLI session |
| vault kv put secret/app key=value | Write a KV secret |
| vault kv get secret/app | Read a KV secret |
| vault policy write name policy.hcl | Upload an access policy |
| vault operator unseal | Unseal a Vault after startup |
Consul consul.hcl
| Command | What it does |
|---|---|
| consul agent -dev | Run a single-node dev agent |
| consul members | List cluster members and their status |
| consul catalog services | List registered services |
| consul kv put key value | Write to Consul's key/value store |
| consul connect proxy -sidecar-for app | Run a mesh sidecar proxy for a service |
| consul operator raft list-peers | Inspect the Raft consensus peers |
Podman Containerfile
| Command | What it does |
|---|---|
| podman ps | List running containers |
| podman run -d -p 8080:80 name | Run a container in the background |
| podman build -t name:tag . | Build an image from a Containerfile |
| podman pod create --name app | Create a pod grouping several containers |
| podman generate systemd --name app | Generate a systemd unit for a container |
| podman machine start | Start the Linux VM backing Podman on macOS |
Argo CD application.yaml
| Command | What it does |
|---|---|
| argocd login HOST | Authenticate the CLI against a server |
| argocd app list | List managed applications |
| argocd app sync my-app | Force a sync from Git to cluster |
| argocd app get my-app | Show sync status and diff |
| argocd app set my-app --sync-policy automated | Enable auto-sync for an app |
| kubectl -n argocd get pods | Check the health of Argo CD's own pods |
GitHub CLI config.yml
| Command | What it does |
|---|---|
| gh auth login | Authenticate the CLI with a GitHub account |
| gh repo clone owner/repo | Clone a repository |
| gh pr create --fill | Open a pull request from the current branch |
| gh pr list | List open pull requests |
| gh pr checkout 123 | Check out a PR by number |
| gh issue list | List open issues |
| gh workflow run name.yml | Trigger a GitHub Actions workflow |
| gh release create v1.0.0 | Cut a new release |
Vagrant Vagrantfile
| Command | What it does |
|---|---|
| vagrant init hashicorp/bionic64 | Create a Vagrantfile for a base box |
| vagrant up | Create and boot the VM |
| vagrant ssh | SSH into the running VM |
| vagrant halt | Stop the VM |
| vagrant destroy | Delete the VM entirely |
| vagrant status | Show current VM state |
| vagrant provision | Re-run provisioning scripts on a running VM |
Packer template.pkr.hcl
| Command | What it does |
|---|---|
| packer init . | Download required plugins for a template |
| packer validate template.pkr.hcl | Check a template for errors |
| packer build template.pkr.hcl | Build the image(s) defined in a template |
| packer fmt -recursive | Auto-format HCL templates |
| packer console | Interactively evaluate HCL expressions |