Shutdown of the OS can be started several ways.
-
Use of the "shutdown" command by "root". Examples:
-
shutdown -h +5 Going down; log out now.
## Shutdown permenantly 5 minutes from now with message.
-
shutdown -r now
## Shutdown and reboot now.
-
shutdown now
## Shutdown only to the "single user mode" (run level 1)
There are many seldom used options to this command. See man page.
-
Use of the "CTRL-ALT-DELETE" (death grip) feature. This is controlled
by the "ctrlaltdel" line in the /etc/inittab file.
-
halt/reboot - In run levels other than 0 and 6, calls "shutdown -h/-r now".
See man page for level 0 and 6. [Feb'98]
-
poweroff - Logs entry in /var/log/wtmp and tells kernel to use the
"power-off on shutdown" kernel option.
-
On computers configured with power-fail (usually with UPS) hardware,
when power is about to fail. This is controlled by the "power" lines
in the /etc/inittab file, etc. See UPS for more info.
Logins can be prevented during the shutdown warning period (or any other time) by
creating a /etc/nologin file. The login program will display the file and refuse
logins. See login man page. Ensure that the file gets deleted during the login
process or only root will be able to log in at the next boot.
Changing run levels:
-
telinit [option]; tell "init" program which run level to switch to. See man page before trying it.
Last Modified 14-Feb-1999
End of page.