systemctl
systemctl is a cli to systemd. Reasonable intro.
The pager defaults to less
. To disable it use --no-pager
or
export SYSTEMD_PAGER=
.
Types of Daemons
To list the unit (daemon) types:
$ systemctl -t help
Available unit types:
service
mount
swap
socket
target
device
automount
timer
path
slice
scope
There are 3 types of daemons:
- services
- sockets
- paths
To see the system’s processes in each:
$ systemctl
$ systemctl list-units --type=service
$ systemctl list-units --type=socket --state=LOAD
$ systemctl list-units --type=path --all
$ systemctl list-unit-files
Also check out:
systemctl list-unit-files
Working with Services
Show Services
Show running services:
systemctl list-units --type=service | grep running
Start Service
Start x11vnc service:
sudo systemctl start x11vnc.service
Show Service Status
systemctl status _service-name_
Show Service Log
Use journalctl:
journalctl --no-pager -u _service-name_