system.d notes

Sun, 9 Feb 2025 17:41:36 GMT

System.d can run stop enable or disbles services with the systemctl command

Examples

sudo systemctl start httpd to start apache web service, can also use restart
sudo systemctl stop httpd stops the service
sudo systemctl enable httpd enables it to start at system startup
sudo systemctl disable httpd duisables it
sudo systemctl status httpd tells you if it is running

possible services are in 1 of 3 directories in this order of priority
the /etc/systemd/system directory ,
the /run/systemd/services directory and
the /lib/systemd/system directory.

So ls-l those directories to see units that systemctl can
control.
package managers will install units to /lib/systemd/system

If you write you own units put them in /etc/systemd/system so they wont be overwritten
by package managers.