Linux systemd and Service Processes

systemd-oriented process inspection, signaling, cgroup views, transient units, and service troubleshooting.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

systemd Service Process Views

Inspect service state and main PIDs under systemd.

Show service status

Show status, recent logs, and the service main PID.

bashANYsystemctlservicestatus
bash
systemctl status nginx
Notes

Show status, recent logs, and the service main PID.

Show main PID only

Extract the tracked main PID for a unit.

bashANYsystemctlmainpid
bash
systemctl show -p MainPID nginx
Notes

Extract the tracked main PID for a unit.

Show unit definition

Print the unit file and drop-ins defining a service.

bashANYsystemctlunit-file
bash
systemctl cat nginx
Notes

Print the unit file and drop-ins defining a service.

List running services

List active services managed by systemd.

bashANYsystemctlservices
bash
systemctl list-units --type=service --state=running
Notes

List active services managed by systemd.

Show logs for a service

Read recent logs associated with one systemd unit.

bashANYjournalctlservicelogs
bash
journalctl -u nginx -n 100 --no-pager
Notes

Read recent logs associated with one systemd unit.

Show logs for a PID

Filter the journal by process ID.

bashANYjournalctlpidlogs
bash
journalctl _PID=1234 -n 100 --no-pager
Notes

Filter the journal by process ID.

systemd Service Control

Start, stop, restart, and signal services through systemd.

Start a service

Start a service unit.

bashANYsystemctlstart
bash
sudo systemctl start nginx
Notes

Start a service unit.

Stop a service

Stop a service unit gracefully.

bashANYsystemctlstop
bash
sudo systemctl stop nginx
Notes

Stop a service unit gracefully.

Restart a service

Restart a service unit.

bashANYsystemctlrestart
bash
sudo systemctl restart nginx
Notes

Restart a service unit.

Reload a service

Ask a service to reload its configuration.

bashANYsystemctlreload
bash
sudo systemctl reload nginx
Notes

Ask a service to reload its configuration.

Send signal to service cgroup

Signal all or selected processes in a service cgroup.

bashANYsystemctlkillsignal
bash
sudo systemctl kill -s SIGKILL nginx
Notes

Signal all or selected processes in a service cgroup.

Signal only main PID

Signal only the service main process.

bashANYsystemctlkillmainpid
bash
sudo systemctl kill --kill-whom=main -s SIGUSR1 nginx
Notes

Signal only the service main process.

Reload or restart if reload unsupported

Use reload when available, else restart.

bashANYsystemctlreload-or-restart
bash
sudo systemctl reload-or-restart nginx
Notes

Use reload when available, else restart.

Control Groups and Unit Trees

Inspect cgroup-based process organization under systemd.

Show cgroup tree

Display control groups and the processes inside them.

bashANYsystemd-cglscgroups
bash
systemd-cgls
Notes

Display control groups and the processes inside them.

Top view for cgroups

Show top cgroups by CPU, memory, and I/O load.

bashANYsystemd-cgtopcgroups
bash
systemd-cgtop
Notes

Show top cgroups by CPU, memory, and I/O load.

Show user sessions

Inspect active user sessions and seats under systemd-logind.

bashANYloginctlsessions
bash
loginctl list-sessions
Notes

Inspect active user sessions and seats under systemd-logind.

Inspect one session

Inspect one logind session in detail.

bashANYloginctlsessions
bash
loginctl show-session 2
Notes

Inspect one logind session in detail.

Show service cgroup path

Reveal the cgroup path tied to a unit.

bashANYsystemctlcgroups
bash
systemctl show -p ControlGroup nginx
Notes

Reveal the cgroup path tied to a unit.

Transient Units and Resource Controls

Launch processes directly under systemd and constrain them.

Run process in transient scope

Run an interactive process in its own transient scope unit.

bashANYsystemd-runscope
bash
systemd-run --scope htop
Notes

Run an interactive process in its own transient scope unit.

Run transient service

Launch a one-off command as a transient service unit.

bashANYsystemd-runservice
bash
systemd-run --unit=myjob --remain-after-exit /usr/bin/sleep 60
Notes

Launch a one-off command as a transient service unit.

Set CPU quota on service

Apply runtime resource-control properties to a unit.

bashANYsystemctlresource-control
bash
sudo systemctl set-property myjob.service CPUQuota=50%
Notes

Apply runtime resource-control properties to a unit.

Set memory cap on service

Limit service memory through cgroup controls.

bashANYsystemctlmemory-limit
bash
sudo systemctl set-property myjob.service MemoryMax=1G
Notes

Limit service memory through cgroup controls.

Recommended next

No recommendations yet.