Enable or Disable Service on startup in Linux

This is about: Enable or Disable service on startup in Linux

systemctl start SERVICE – starts a service, but doesn’t remain after reboot

systemctl stop SERVICE – stops a service, but doesn’t remain after reboot

systemctl restart SERVICE – restarts a service, but doesn’t remain after reboot

systemctl reload SERVICE – is supported by service, will reload configuration of the service without interfering with services depending on it.

systemctl status SERVICE – shows actual status of a service -is it currently running or not

systemctl enable SERVICE – changing service status to enabled. Service will be turned on at nest reboot.

systemctl disable SERVICE – turns off the service – it will not load at next reboot.

systemctl is-enabled SERVICE – checks if the service is enabled to load at startup

systemctl is-active SERVICE – checks if the service is running at the very moment

systemctl show SERVICE – information about the service.

systemctl mask SERVICE – (as root) the service is being disabled completely (service directed to/dev/null). Service wont be able to turned on by any command.

sudo systemctl unmask SERVICE – Reverts above action .

service –status-all – List running services using service command

To print the status of apache (httpd) service:
service httpd status

chkconfig --list – lists all known services

netstat -tulpn – lists services and their open ports

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *

one + twelve =