CentOS/RHEL 6: Shutdown Command

The shutdown command is used to shut down a CentOS 6 or RHEL 6 system.

Here are a few examples of how to use the shutdown command:

  1. To shut down the system immediately:
sudo shutdown -h now
  1. To shut down the system after a specified delay:
sudo shutdown -h +<delay>

Replace <delay> with the number of minutes you want to wait before shutting down the system.

  1. To reboot the system immediately:
sudo shutdown -r now
  1. To reboot the system after a specified delay:
sudo shutdown -r +<delay>

Replace <delay> with the number of minutes you want to wait before rebooting the system.

Note that you need to have sudo privileges to use the shutdown command. You can use the wall command to broadcast a message to all logged-in users prior to shutting down the system:

sudo shutdown -h +<delay> "The system is going down for maintenance in <delay> minutes."

This will display the message The system is going down for maintenance in <delay> minutes. to all logged-in users.

Leave a Comment