add container service management commands to readme

This commit is contained in:
Yan Lin 2025-11-07 18:50:43 +01:00
parent 2d0f6dd8eb
commit 7ab52b0d49

View file

@ -83,16 +83,20 @@ nixos-rebuild build --flake .#<host>
## Service Management (NixOS)
```bash
# Check service status
# Container services
sudo systemctl start/stop/restart podman-<container>.service
sudo systemctl status podman-<container>.service
sudo journalctl -u podman-<container>.service -f # Follow logs
sudo journalctl -u podman-<container>.service -n 100 # Last 100 lines
# Podman commands
sudo podman ps -a
sudo podman logs -f <container>
sudo podman exec -it <container> bash
# Other services
systemctl status <service>
journalctl -u <service> -f
# Container management
podman ps # Actually podman
podman logs <container>
podman exec -it <container> bash
# Systemd timers
systemctl list-timers
```