Friday, September 18, 2009

Cancel Shutdown on Fedora Linux using shutdown Command

Running Shutdown Process on Background


1.  Running shutdown process on background... The shutdown command bellow tell Fedora system to shutdown at 8:00 pm (20:00).
Cancel Shutdown on Fedora Linux using shutdown command, Running shutdown process on background
[root@fedora ~]# shutdown -h 20:00 "shutdown in progress" &
[1] 3143
[root@fedora ~]#
Broadcast message from root@fedora.linux.com
        (/dev/pts/1) at 4:11 ...

The system is going down for halt in 949 minutes!
shutdown in progress

[root@fedora ~]#

Cancel Shutdown


2.  To cancel shutdown that in progress on Fedora system, execute shutdown -c as show on example below
To cancel shutdown that in progress on Fedora system
[root@fedora ~]# shutdown -c "cancel shutdown"

Broadcast message from root@fedora.linux.com
        (/dev/pts/0) at 4:28 ...

cancel shutdown
[root@fedora ~]#

Shutdown error:


1.  If you get the "-bash: shutdown: command not found" error when execute shutdown command as show on example below...
Shutdown:
[fedora@fedora ~]$ shutdown -h 20:00 "shutdown in progress"
-bash: shutdown: command not found
[fedora@fedora ~]$

Cancel Shutdown:
[fedora@fedora ~]$ shutdown -c "cancel shutdown"
-bash: shutdown: command not found
[fedora@fedora ~]$

Shutdown error solutions:


 2.  you may need to log in as root user to execute shutdown command....or use the su command as show on example below and supply the root user password when ask...

Shutdown:
[fedora@fedora ~]$ su - -c "shutdown -h 20:00 'shutdown in progress'&"
Password:
[fedora@fedora ~]$
Broadcast message from root@fedora.linux.com
        (unknown) at 4:42 ...

The system is going down for halt in 918 minutes!
shutdown in progress

[fedora@fedora ~]$

Cancel Shutdown:
[fedora@fedora ~]$ su - -c "shutdown -c 'cancel shutdown'"
Password:
shutdown: Shutdown cancelled

Broadcast message from root@fedora.linux.com
        (/dev/pts/1) at 4:41 ...

cancel shutdown
[fedora@fedora ~]$

Note: This canceling shutdown command above have been tested on Fedora 7, Fedora 8, Fedora 9, Fedora 10

No comments:

Post a Comment