How to restart a VPS service
Sometimes services on a Linux machine, or on a VPS, need to be restarted: e.g. when a configuration change has been made, so that it takes effect. Running processes or services on a virtual private server can be restarted in several ways, depending on your preferred way yo manage the VPS - via the command line or via the VPS Control Panel, if such is present.
A service restart via the command line:
There are two ways to restart a service via the command line. In both cases you must be logged in as root, since a normal user does not have enough privileges to execute such commands. I will give an example with the named service:
#~: service named restart
#~: /etc/init.d/named restart
A service restart via cPanel (WHM):
To restart a service on a VPS running cPanel as preferred Control Panel software, one must log into the root WHM -> Restart Services menu.
A service restart via DirectAdmin:
With DirectAdmin, services are once again restarted at the Admin Level via the Admin Tools -> Service Monitor menu.