systemctl
systemd and,,
Syntax
systemctl [command] [unit]
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
start |
|
Common | |
stop |
|
Common | |
restart |
|
Common | |
status |
|
Common | |
enable |
|
Common | |
disable |
|
Common | |
--type |
|
Common |
Examples
nginx
systemctl status nginx
nginx
systemctl restart nginx
docker
systemctl enable docker
systemctl list-units --type=service --state=running
New systemd ( unit )
systemctl daemon-reload
()
systemctl is-active postgresql
Tips
- /etc/systemd/system/ unit daemon-reload
- journalctl -u nginx
- systemctl cat nginx unit
- enable --now