×


Reboot CentOS 8 - Different methods to do it ?

Linux OS as compared to Windows OS usually does not require a reboot.

Linux OS can run for a longer time without a reboot except for a few cases like when there is a kernel update or security patches when it becomes important to reboot. 

Reboot command is used restart or reboot the system. In a Linux system administration, there comes a need to restart the server after the completion of some network and other major updates. 

It can be of software or hardware that are being carried on the server.

Like with everything in Linux, there are several ways to perform a single task, the same is true with rebooting the OS. There is a number of ways to reboot a Linux system. 

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform CentOS related tasks.

In this context, we shall look into ways to reboot a CentOS system.


How to reboot a CentOS system ?

You can reboot the CentOS using either of the following methods:

i. Via keyboard shortcut.

ii. Via command line.

iii. Via GUI (Graphical User Interface).


Now, let's us look into these methods of rebooting CentOS 8 system.


1. Reboot CentOS via Keyboard Shortcut

The quickest method to reboot a Linux system is by using the keyboard shortcut.

Whenever you need to reboot your CentOS system, simply press Ctrl+Alt+Del.

It will show a dialog. Click the Restart button in order to reboot your system. 

To cancel the restart, click Cancel

If you do not pick any option, the machine will automatically poweroff in 1 minute.


2. Reboot CentOS via Command Line

Here, we will share some of the command line ways to reboot a CentOS system:

i. Using the "reboot" Command:

The most common way to reboot a Linux system is by using the "reboot" command. 

Simply type the following command in Terminal to reboot your system:

$ reboot

This command will start rebooting your system at once.


In order to force reboot the system; use the –force or -f option as follows:

$ reboot --force

or

$ reboot -f


ii. Using the "poweroff" Command:

Usually, the poweroff command is used to poweroff the system; however, you can also use it to reboot the system. 

To reboot the CentOS system, type poweroff followed by –reboot option.

$ poweroff --reboot

This command will start rebooting your system at once.


iii. Using the "shutdown" Command:

Similar to the poweroff command, the shutdown command can also be used to reboot the system. 

In order to reboot a CentOS system, type shutdown followed by either –reboot or -r option as follows:

$ shutdown --reboot

or

$ shutdown -r

This command will start rebooting your system at once.


iv. Using the "halt" Command:

The halt command can also be used to reboot a CentOS system. 

In order to reboot the system, type halt followed by –reboot option:

$ halt --reboot

This command will start rebooting your system at once.


v. Using the "telinit" Command:

Another method to reboot a CentOS system is via telinit command. 

In order to reboot a CentOS system, type telinit followed by 6:

$ telinit 6

This command will start rebooting your system at once.


3. Reboot CentOS via GUI

For users who prefer to work on GUI, here is how to reboot a CentOS system from the graphical interface:

i. Using the Power Off Button:

Many of the user activities can be performed right from the desktop. 

This also applies to rebooting the system. 

a. In order to reboot the CentOS system, access the menu at the top right corner of your desktop by clicking on it. 

By doing so, a drop-down menu will show up. 

b. Click the poweroff button. After clicking the poweroff button, a dialog will appear. 

c. Click the Restart button in order to reboot your system. 

d. To cancel the restart, click Cancel. 

If you do not pick any option, the machine will automatically poweroff in 1 minute.


ii. Using the Power Off Utility:

Another way to reboot your system via GUI is the Poweroff utility. 

a. To open the Poweroff utility, Click the Activities button on the top left corner of your desktop or press the super key, then type reboot or poweroff in the search bar that appears. When the icon for poweroff utility appears, click it to open.

b. It will open a dialog. Click the Restart button in order to reboot your system. 

c. To cancel the restart, click Cancel. If you do not choose any option, the machine will automatically poweroff in 1 minute.


[Need urgent assistance to install missing packages on your CentOS System? We are available to help you. ]


Conclusion

This article will guide you on the different methods to reboot a #CentOS system which includes the keyboard shortcut, command line, and GUI based methods. 

There's nothing different in running sudo reboot in a instance versus on your own server. This action shouldn't cause any problems. 

You can shutdown/start/reboot the instance and your data will persist.

When used with no arguments, the shutdown command will power off the machine. sudo shutdown. 

The shutdown process starts after 1 minute, which is the default time interval.

It is recommended that you do a #reboot of your Server at least once per month. 

The Dedicated Hosting Servers are just computers, you would not leave your computer on for months straight without a single reboot, so the same rules apply for servers.


To reboot your Linux Server via #SSH:

1. Open Command Prompt. If you have a graphical interface, open the terminal by right-clicking the Desktop > left-clicking Open in terminal.

2. Use SSH Connection Issue reboot Command. In a terminal window, type: ssh –t user@server.com 'sudo reboot'.