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
'+' -----> Installed
'-' -----> Not Installed
systemctl status apache2
To stop the service :
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 "
Masking & unmasking service :
Mask is just like a COVER to a painting , you don't want anyone to touch.
But you can't touch the paint as its MASKED i.e., START it.
UN-MASK it and start the service,
List all the services which are masked ?
systemctl list-unit-files | grep masked
Note :
- service & systemctl both are same.
- Reload - will load the configuration files alone.
Top comments (0)