DEV Community

sathishkumar balachandran
sathishkumar balachandran

Posted on

Service Management - Linux

What is this chapter ?

  • Its about the services which are running in background , whether while starting of the OS or starting the services after the OS.

List all the service which are running in the server :

service --status-all

Image description

'+' -----> Installed
'-' -----> Not Installed

Image description

systemctl status apache2

To stop the service :

Image description

service apache2 stop ( it should be in SUDO )
service apache2 reload
service apache2 restart ( it will load from the scratch )

For systemctl - we need to say " WHAT WE NEED TO DO FIRST "

Disable & Enable service :

You can see its ENABLED in the screenshot , it means " ITS LOADED AUTOMATICALLY WHILE STARTUP "

Image description

Image description

Masking & unmasking service :

Image description

Mask is just like a COVER to a painting , you don't want anyone to touch.

Image description

But you can't touch the paint as its MASKED i.e., START it.

Image description

UN-MASK it and start the service,

Image description

List all the services which are masked ?

systemctl list-unit-files | grep masked

Image description

Image description

Note :

  1. service & systemctl both are same.
  2. Reload - will load the configuration files alone.

Top comments (0)