Show service status
Show status, recent logs, and the service main PID.
systemctl status nginxShow status, recent logs, and the service main PID.
systemd-oriented process inspection, signaling, cgroup views, transient units, and service troubleshooting.
Inspect service state and main PIDs under systemd.
Show status, recent logs, and the service main PID.
systemctl status nginxShow status, recent logs, and the service main PID.
systemctl show -p MainPID nginxExtract the tracked main PID for a unit.
systemctl cat nginxPrint the unit file and drop-ins defining a service.
systemctl list-units --type=service --state=runningList active services managed by systemd.
Read recent logs associated with one systemd unit.
journalctl -u nginx -n 100 --no-pagerRead recent logs associated with one systemd unit.
journalctl _PID=1234 -n 100 --no-pagerFilter the journal by process ID.
Start, stop, restart, and signal services through systemd.
sudo systemctl start nginxStart a service unit.
sudo systemctl stop nginxStop a service unit gracefully.
sudo systemctl restart nginxRestart a service unit.
sudo systemctl reload nginxAsk a service to reload its configuration.
Signal all or selected processes in a service cgroup.
sudo systemctl kill -s SIGKILL nginxSignal all or selected processes in a service cgroup.
sudo systemctl kill --kill-whom=main -s SIGUSR1 nginxSignal only the service main process.
Use reload when available, else restart.
sudo systemctl reload-or-restart nginxUse reload when available, else restart.
Inspect cgroup-based process organization under systemd.
systemd-cglsDisplay control groups and the processes inside them.
systemd-cgtopShow top cgroups by CPU, memory, and I/O load.
Inspect active user sessions and seats under systemd-logind.
loginctl list-sessionsInspect active user sessions and seats under systemd-logind.
loginctl show-session 2Inspect one logind session in detail.
systemctl show -p ControlGroup nginxReveal the cgroup path tied to a unit.
Launch processes directly under systemd and constrain them.
Run an interactive process in its own transient scope unit.
systemd-run --scope htopRun an interactive process in its own transient scope unit.
Launch a one-off command as a transient service unit.
systemd-run --unit=myjob --remain-after-exit /usr/bin/sleep 60Launch a one-off command as a transient service unit.
Apply runtime resource-control properties to a unit.
sudo systemctl set-property myjob.service CPUQuota=50%Apply runtime resource-control properties to a unit.
Limit service memory through cgroup controls.
sudo systemctl set-property myjob.service MemoryMax=1GLimit service memory through cgroup controls.