How To Restart CentOS, Fedora, RedHat?

CentOS, Fedora and RedHat are Linux distributions of the same family. These distributions provides different ways and command in order to restart. In this tutorial we will look different ways to restart CentOS, Fedora and RedHat and their affect to the system.

Restart with Shutdown Command

shutdown command is the most common way to stop or restart the system. Without providing an option shutdown will shutdown the system but will not restart. We will provide -r option in order to restart the system like below.

$ shutdown -r

Restart with Shutdown Command At Specified Time

By default shutdown operation starts immediately. But we have the option to reboot at specified time in the future. We generally use minutes after to reboot. In this example we will restart the system after 5 minutes by providing +5 option.

$ shutdown -r +5
Restart with Shutdown Command At Specified Time
Restart with Shutdown Command At Specified Time

Restart with Reboot Command

Reboot is actually not a command. reboot is a script which is alias for shutdown -r . So their affect will be the same. We can use reboot command like below. reboot also does some hard disk maintenance like sync etc.

$ reboot

Restart with Halt Command

We can use halt command with --reboot option. halt command provides some log to the utmp . Most init scripts call halt for logging options. We can restart system like below with halt command.

$ halt --reboot

Restart with Init Level

Linux uses init levels in order to specify current working mode. Level 6 is used to specify the reboot state. We can use init command in order to change Level 6 which will reboot the system. By using init related init files will be executed and invoked.

$ init 6

LEARN MORE  How Change Run Levels In Linux?

Leave a Comment