Skip to content

Command cheat sheet

Extracted from the master document on 2026-09-04. The §N numbering is kept so cross-references are not broken.

Terminal window
# --- Docker / Compose ---------------------------------------------------
docker ps # live containers
docker ps -a # including stopped ones
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
docker logs <container> --tail 50
docker inspect -f '{{json .NetworkSettings.Networks}}' <container>
docker network ls
docker volume ls
docker stats --no-stream
docker compose config --quiet # validate WITHOUT printing secrets
docker compose up -d # reconciles with the compose file
docker compose up -d --build # and also rebuilds the image
docker compose ps
docker compose logs --tail=100
docker compose restart # restarts what already exists
docker compose stop / down
# --- Caddy --------------------------------------------------------------
sudo docker compose exec caddy caddy fmt --diff /etc/caddy/Caddyfile
sudo docker compose logs caddy --tail 100
# --- Storage ------------------------------------------------------------
lsblk -o NAME,SIZE,MODEL,FSTYPE,MOUNTPOINTS
sudo blkid /dev/sdb1
findmnt /mnt/storage
df -h /mnt/storage
free -h # look at `available`, not the %
sudo systemctl daemon-reload && sudo mount -a # after editing /etc/fstab
# --- Proxmox ------------------------------------------------------------
sudo pve-firewall status
sudo /usr/sbin/qm list
sudo /usr/sbin/qm config 100
sudo pvesm extractconfig local:backup/<archivo>.vma.zst
sudo qmrestore <ruta>.vma.zst <nuevo-vmid> --storage local-lvm
# --- Backup -------------------------------------------------------------
sudo RCLONE_CONFIG=/etc/rclone/rclone.conf rclone lsd secure:
sudo -u borg env BORG_PASSPHRASE="$BORG_PASSPHRASE" borg list <repo>
sudo sqlite3 <db> 'PRAGMA integrity_check;'

The difference people forget: docker compose restart restarts the existing containers; docker compose up -d reconciles the state with the Compose file and may recreate them if the configuration changed.