ubuntu restart server code example
Example 1: ubuntu 14 apache2 graceful restart
sudo service apache2 restart
sudo service apache2 start
sudo service apache2 stop
sudo service apache2 reload
Example 2: restart ubuntu server
Try using the following command to safely reboot:
sudo reboot
If, instead, you want to shut down the server safely, use this command:
sudo shutdown -h now
Example 3: restart terminal command line ubuntu
$ reset
$ source ~/.bashrc
$ reboot
Example 4: centos reboot
shutdown -r now