Terminal Dojo
Help العربية Sign inGet started

Command library / systemctl

systemctl

BashDraft — pending expert review4 practice missions

Inspect and control system services

The front end to systemd, which starts and supervises almost everything on a modern Linux host. For a defender it answers two questions quickly: is this service healthy right now (status shows its state and latest log lines), and what is set to start automatically at boot, which is one of the first places to look for persistence.

Practice systemctl

Usage

systemctl [--type=TYPE] [--state=STATE] command [unit]

Options and flags

Examples

Common mistakes

systemctl nginx status systemctl status nginx

The action comes first, then the unit: here systemctl reads 'nginx' as an unknown command.

Related commands

journalctlssps