How to Properly Shutdown and Reboot Linux CentOS 5/CentOS 6/RHEL 5/RHEL 6

This post will show you the proper command to shutdown and reboot the linux server. To shut down Red Hat Enterprise Linux(RHEL) and CentOS, the root user may issue the /sbin/shutdown command. All the command has been tested on CentOS 6.2 but may workings on other CentOS and RHEL version. The shutdown man page has a complete list of options, but the two most common uses are:

Example 1. How to Properly Shutdown CentOS 5/CentOS 6/RHEL 5/RHEL 6 :

[root@centos62 ~]# /sbin/shutdown -h now

Example 2. How to Properly Reboot CentOS 5/CentOS 6/RHEL 5/RHEL 6 :

[root@centos62 ~]# /sbin/shutdown -r now

After shutting everything down, the -h option halts the machine, and the -r option reboots.

READ  How to Change RunLevel on CentOS 7 / RHEL 7

These are another useful shutdown command :

Example 3. To shutdown in next 10 minutes:

[root@centos62 ~]# /sbin/shutdown -h +10

Example 4. To reboot in next 10 minutes:

[root@centos62 ~]# /sbin/shutdown -r +10

Example 5. To shutdown the server in next 3 seconds :

[root@centos62 ~]# /sbin/shutdown -t3 -r now

The option “-t3” tells the shutdown command to wait 3 seconds before it starts killing processes.

Example 6. Resheduled to shutdown the server at 12:15 :

login as: root
root@192.168.1.44's password:
Last login: Fri Jun  1 12:05:27 2012 from 192.168.1.52
[root@centos62 ~]# date
Fri Jun  1 12:12:00 MYT 2012
[root@centos62 ~]# /sbin/shutdown -r 12:15

Broadcast message from root@centos62.ehowstuff.local
        (/dev/pts/0) at 12:12 ...

The system is going down for reboot in 3 minutes!

Broadcast message from root@centos62.ehowstuff.local
        (/dev/pts/0) at 12:13 ...

The system is going down for reboot in 2 minutes!

Broadcast message from root@centos62.ehowstuff.local
        (/dev/pts/0) at 12:14 ...

The system is going down for reboot in 1 minute!

Leave a Reply

Your email address will not be published. Required fields are marked *

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee