How to ‘Hard Reboot’ a Linux system from Command Line?

I am a software developer. During the course of testing my code changes, I fall in need of rebooting my Linux test system. Since this is a test box, I do not mind performing a hard reboot to save time. But, to perform a hard reboot, I need to visit the box manually and press the hard reset button.

Since I my test machine is located at a remote site, I cannot visit the machine personally for every reboot requirement. Hence, I have to reboot the box from the command line and it has to be a hard reboot.

How do you hard reboot the box a Linux system from Command Line?

The trick is simple. Issue the ‘reboot’ command twice.

Issuing the ‘reboot’ command from the command line will trigger ‘init 6’. The runlevel 6 signifies a reboot of the machine. Issuing the ‘reboot’ command again will reboot the box instantly as if somebody has pressed the hard-reset button.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s