View systemctl service file

To view the content of a systemd service file, run the command systemctl cat SERVICE_NAME_HERE Example boby@sok-01:~$ systemctl cat nginx # /lib/systemd/system/nginx.service # Stop dance for nginx # ======================= # # ExecStop sends SIGSTOP (graceful stop) to the nginx process. # If, after 5s (–retry QUIT/5) nginx is still running, systemd takes control # and … Read more

Enable rc.local

To enable /etc/rc.local file run on system startup on servers runing systemd, you can run systemctl enable rc-local Now you need to create file /etc/rc.local with 755 permission. touch /etc/rc.local chmod 755 /etc/rc.local See Autostart

systemctl

Service files To list all services run To list failed services List all enabled services List timers See all running services See see dependency for a package, run Detect virtualization Service file location service files are located in /usr/lib/systemd/system Systemd unit types