반응형

source : http://linux.101hacks.com/unix/shutdown/

Shutdown the machine immediately

# shutdown -h now

Broadcast message from sathiya@sathiya-laptop
	(/dev/pts/1) at 11:28 ...

The system is going down for halt NOW!

Reboot the machine immediately

# shutdown -r now

Broadcast message from sathiya@sathiya-laptop
	(/dev/pts/1) at 11:28 ...

The system is going down for reboot NOW!

Shutdown the machine with user defined message

# shutdown -h now 'System is going down for replacement of primary memory'

Broadcast message from sathiya@sathiya-laptop
	(/dev/pts/1) at 11:28 ...

The system is going down for halt NOW!
System is going down for replacement of primary memory

Scheduling the shutdown with 24 hour format

# shutdown -h 20:00

It sends the following message immediately to all terminals.

Broadcast message from sathiya@sathiya-laptop
	(/dev/pts/3) at 10:25 ...

The system is going down for halt in 575 minutes!

Similar to shutdown (halt), you also schedule a reboot at a specified time as shown below.

# shutdown -r 20:00

Broadcast message from sathiya@sathiya-laptop
	(/dev/pts/3) at 10:27 ...

The system is going down for reboot in 573 minutes!

Cancel a running shutdown

You can cancel the running shutdown by using -c option as,

# shutdown -c

Syntax and Options

shutdown [OPTION]… TIME [MESSAGE]

Short OptionOption Description
-rRequests that the system be rebooted after it has been brought down
-hRequests that the system be either halted or powered off after it has been broughtdown, with the choice as to which left up to the system
-HRequests that the system be halted after it has been brought down
-PRequests that the system be powered off after it has been brought down
-cCancels a running shutdown. TIME is not specified with this option, the firstargument is MESSAGE
-kOnly send out the warning messages and disable logins, do not actually bring thesystem down



+ Recent posts