How to Reboot a Linux Server

Generally speaking, it is a good idea to avoid the need to reboot a dedicated server. The moment you do, your server will experience some amount of down time; hopefully only the amount of time it takes to shut down all processes and restart.

Therefore, it is a good idea to minimize reboots and schedule them only when your system has an important kernel security update. For other updates, a reboot is not required.

Despite your best efforts, there may be other times when a reboot is necessary. If something goes wrong with the server, you can usually troubleshoot software without rebooting, but the option is still there as a last resort.

To reboot on a Linux server, the command is simple:

reboot

or

shutdown -r now

If you have a multi-user system that may have others logged in, you can send a warning to them that the system will be shut down. You can even schedule it to give them time to finish whatever they might be doing.

shutdown -r +5

This command will tell users that the system is shutting down in 5 minutes and will also prevent new users from logging in during that time.

In most cases, a server reboot will be pretty quick, even faster than a desktop reboot because it does not have to load a graphical interface or a lots of memory resident programs. If your server takes a while to reboot, you should probably investigate and even consider disabling services loaded at boot time that you do not need.











Comments: