Introduction
Laymen explanation
Technical explanation
There are two officially adopted methods for controlling services:
systemctl
service
Which one you use will depend on if your distribution makes use of systemd or init. Fortunately, the developers of systemd made sure to retain service and redirect it to systemctl.
Let's say we're on CentOS and we want to stop the Apache server. To do this we'd open up a terminal window and issue the command:
sudo systemctl stop httpd
The Apache server would stop and you'd be returned to the bash prompt. To start the same service, we'd issue the command:
sudo systemctl start httpd
The service would start and you'd be returned to your bash prompt.
To restart the same service, we'd issue the command:
sudo systemctl restart httpd
The service would restart and you'd be returned to the bash prompt.
Other useful commands
start/stop/restart /try-restart /reload /status/enable/disable
Service usage
The service command usage is a bit different from systemctl. The service name and start|stop|restart options are switched:
sudo service httpd start sudo service httpd stop sudo service httpd restart
Manual control
You can directly walk thro' the control script and run the command for start/stop. For example, below command will restart networking.
sudo /etc/init.d/networking restart
Reference
http://www.techrepublic.com/article/how-to-start-stop-and-restart-services-in-linux/
https://askubuntu.com/questions/230698/how-to-restart-the-networking-service
https://linoxide.com/linux-command/start-stop-services-systemd/