Linux & shell: Services & logs (systemd)
6 Linux & shell commands: Services & logs (systemd). Click a command to see what each part does.
Linux & shell: Services & logs (systemd)Index
- Whole sheet251
- Navigate & list13
- Create, copy, move, delete13
- View & compare files9
- Permissions & ownership31
- Help & shell basics11
- Users & groups6
- Install packages7
- Package & software versions29
- System info9
- Network basics & SSH10
- Zip & compress4
- Shell operators6
- Processes6
- Files & search8
- Text processing pipelines4
- Disk3
- Network5
- Services & logs6
- Archives & copying4
- Firewall7
- Scheduling: cron & systemd timers6
- Storage, mounts & LVM10
- Kernel, hardware & limits8
- Performance & tracing10
- TLS & certificates8
- Packet capture & network debugging10
- Terminal tools8
Services & logs (systemd)6
systemctl status <unit> --no-pager -lStatus and recent logs of a serviceWhat each part does
systemctl status <unit>state, PID, last exit code and the last log lines--no-pagerprint directly instead of opening less-ldon't truncate long lines
sudo systemctl enable --now <unit>Start at boot and start nowWhat each part does
enablecreate the links so the unit starts at boot--nowalso start it right away
sudo systemctl daemon-reload && sudo systemctl restart <unit>Reload unit files after editing themWhat each part does
daemon-reloadre-read unit files (does not restart services)&&only if that worked…restart <unit>stop then start the service
journalctl -u <unit> -f -n 100Follow a service logWhat each part does
-u <unit>only messages from that unit-ffollow new entries-n 100start with the last 100 lines
journalctl -p err -b --no-pagerErrors since bootWhat each part does
-p errpriority "err" and more severe (crit, alert, emerg)-bcurrent boot only (-b -1 = previous boot)--no-pagerplain output
journalctl -u <unit> --since "1 hour ago" --until nowLogs in a time windowWhat each part does
--sincestart time: absolute ("2026-11-20 10:00") or relative ("1 hour ago", "yesterday")--untilend time
Nothing matches.
My DevOps Playbook by Angelo John Calleja