Are you on CentOS? CentOS is the playground for new RHEL users as it offers the same experience and feel of the enterprise environment where there are lots of works ongoing every single second. For such a busy system, sometimes, rebooting becomes a must. In this tutorial, we’ll be checking out the reboot methods for your CentOS.
The simplest thing to do is fire up the terminal and run the following command –
This command will reboot the entire system. It can take some time for rebooting as there might be other users and processes running and the system will wait for them to terminate.
If you’re in need of a forced reboot, then add the “-f” flag.
Rebooting is also possible using the “shutdown” command. For that purpose, use the “-r” flag with “shutdown” –
Note – the command requires “root” privilege to run.
Here, you’ll notice a couple additional parts in the command. Let’s discuss them.
- +10 : Gives the system users 10 min time for performing all the pending actions as the system is going to restart itself after 10 minutes starting the count from running the command.
- “<string” : This part is for showing a warning message to all the users.