___________________________________________________________
Services basically refer to those processes which help to run or maintain a certain working environment for other processes or programs in the system. There are various command line utilities that help to start, stop, restart and monitor services in the system. Lets look at some of those commands.
1. service:
This command runs a System V init script that removes most environmenta variable and sets the working path to root directory or /.
To check the status of all the services in the system the command used is:
sudo service --status-all
For starting a certain service you can use following command in the terminal:
sudo service <service name> start
For checking the status of a certain service you can use following command:
sudo service <service name> status
For stopping and restarting the service you can use following commands respectively:
sudo service <service name> stop
sudo service <service name> restart
2. systemctl:
This command can be used to inspect and control the state of "systemd" system and the service manager.This command is quite similar to the service command the difference being that it can be used to initialise any services during the startup or boot process.
For checking the status of all the services use following command in the terminal:
sudo systemctl status
For starting, stopping and restarting any services you can use following cmmands respectively:
sudo systemctl start <service name>
sudo systemctl stop <service name>
sudo systemctl restart <service name>
Author: Nischal Karki
Follow us on:
Comments
Post a Comment