Commands.md
Useful Commands
Aliases
ufwlog -> sudo tail -f /var/log/ufw.log
dps -> docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
Docker
Check running containers
Standard command:
docker ps
Custom alias (cleaner table output):
dps
Definition: docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"
View Logs
tail the last 100 lines and follow:
docker logs -f --tail 100 <container_name>
Restart a service
Inside the service directory:
docker compose restart <service_name>
Update a container
- Pull new image:
docker compose pull - Recreate container:
docker compose up -d - Remove old images:
docker image prune
System
Update System
sudo apt update && sudo apt upgrade -y
Check Disk Usage
df -h