CentOS/RHEL 6: Shutdown Command

w‮uttual.ww‬ri.com
CentOS/RHEL 6: Shutdown Command

To shutdown a system running CentOS or Red Hat Enterprise Linux (RHEL) 6, you can use the shutdown command. This command allows you to schedule a shutdown or reboot of the system at a specified time.

To shut down the system immediately, use the -h option and specify the time as now:

sudo shutdown -h now

To schedule a shutdown at a specific time, use the -h option and specify the time as hh:mm:

sudo shutdown -h 17:30

This will shut down the system at 5:30 PM.

You can also specify a shutdown message that will be displayed to all logged-in users by using the -m option:

sudo shutdown -h 17:30 -m "The system is going down for maintenance at 5:30 PM"

Note that the shutdown command requires root privileges, so you will need to use sudo to execute it.

To cancel a scheduled shutdown, use the -c option:

sudo shutdown -c

This will cancel the previously scheduled shutdown.

Created Time:2017-10-16 14:38:41  Author:lautturi