Units
- Things that systemd can manage
- A service is a type of service
Interact with systemd in terminal
- systemctl is used
systemctl status serviceName # inspect a service
sudo systemctl start serviceName # start a service
sudo systemctl stop serviceName # stop a service
sudo systemctl restart serviceName # start a service
sudo systemctl reload serviceName # reload the config file
sudo systemctl enable serviceName # enable a service
sudo systemctl disable serviceName # disable a service
sudo systemctl daemon-reload # reload systemd, every changes take effectUnit directories
1) /etc/systemd/system # highest priority
2) /run/systemd/system # runtime unit
3) /lib/systemd/system # lowes priority - newly install service go hereService file
- Configuration file in systemd
/lib/systemd/system/http.serviceEdit service files
sudo systemctl edit httpd.service
# sudo systemctl edit serviceName.serviceInfo
‘system’ command, instead of systemctl, is used in a system without systemd