Shutdown Linux Commands

What is Linux Shutdown Command?

Explanation

Shutdown COMMAND:

Shutdown - Turn off the computer immediately or at a specified time.
Shutdown / Turn off brings the system down in a secure way. All logged-in users are notified that the system is going down, and login(1) is blocked. It is possible to shut the system down immediately or after a specified delay. All processes are first notified that the system is going down by the signal SIGTERM.
This gives programs like vi(1) the time to save the file being edited, mail and news processing programs a chance to exit cleanly, etc. Shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither the -h or -r flag is given to shutdown.
To see which actions are taken on halt or reboot see the appropriate entries for these runlevels in the file /etc/inittab.

SYNTAX :


/sbin/shutdown [-t sec] [-arkhncfFHP] time [warning-message]

OPTIONS:


-a Use /etc/shutdown.allow.
-t sec Tell init(8) to wait sec seconds between sending processes the warning and the kill signal, before changing to another runlevel.
-k Don’t really shutdown; only send the warning messages to everybody.
-r Reboot after shutdown.
-h Halt or poweroff after shutdown.
-H Halt action is to halt or drop into boot monitor on systems that support it.
-P Halt action is to turn off the power.
-f Skip fsck on reboot.
-F Force fsck on reboot.
-c Cancel an already running shutdown.

EXAMPLE:


shutdown 10:00
Shutdown the computer at 10-oclock


Ask Questions

Ask Question