Your brand new Linux server may seem a bit intimidating at first, but with a little training and practice, you will find it to be very manageable. The following is a quick guide to restarting services and your OS itself.
Reboot – Rebooting your server is quite simple. On the console, you can press CTRL+ALT+Delete. If you are accessing your server remotely via SSH, simply type while logged in as Root:
All logged in users will be informed that your system is rebooting.
Another method of rebooting is to use the shutdown command with the “-r” option. This is useful if you want a delayed reboot and if you want to add a custom message to users. For example, to reboot in 5 minutes, type:
shutdown -r +5 "This server will reboot in 5 minutes. Please save your work and log off."
Service Restart -To restart services, it may vary depending on distribution. For RHEL/CentOS/Fedora and Ubuntu, you would type:
service [servicename] restart
So for Apache on CentOS, it would be:
service httpd restart
Always keep in mind that any service related to your connection must be available for you to stay connected. In other words, if you restart networking, you will lose your connection, so you had better hope it comes back online. The same goes for rebooting the entire server.