Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

shutdown(8) [minix man page]

SHUTDOWN(8)						      System Manager's Manual						       SHUTDOWN(8)

NAME
shutdown - graciously close the system down SYNOPSIS
shutdown [-hrRmk] [-x code] [time-specification [message]] DESCRIPTION
Shutdown is a program which allows a system operator to close down the system in an nice way. Shutdown informs the users why and when the system is going down. This warning is issued 10 minutes before shutdown time and every minute in the last 5 minutes. At this time (5 min- utes), shutdown creates a file /etc/nologin to prevent new users from logging in. Shutdown keeps a logfile of shutdowns. Every shutdown is registered in /usr/adm/wtmp, if this file exists. After these actions, a call is done to reboot(2) which actually brings the system down. Time-specification may be something like 15:00, 15.00, +15, or now for a shutdown at 3pm (twice), 15 minutes from now, or immediately. The message may be used to describe why the system is going down, it may also be typed on standard input with the -m option. OPTIONS
-h This flag prevents the system from rebooting after the shutdown. The system can now be powered off. This is the default. -r This flag indicates that the system should reboot after shutting down. -R Reboot the system by resetting it. Normally the kernel will try to return to the Boot Monitor. With -R the system will receive a hardware reset. -x code Halt the system and let the Monitor execute the given code as if typed at the monitor prompt. You can for instance use -x 'boot hd0' as a very fast way to reboot "from the top." -m Allows the operator to type a shutdown message on standard input, that will be added to the messages displayed on all terminals. -k This option gives the possibility of terminating an already started shutdown. This is only possible if shutdown time has not yet arrived. -C Check if the system crashed. This option is not used at shutdown time, but at reboot time. It tells if the file systems should be checked by testing if the last entry in the wtmp file is a shutdown entry. (A crude replacement for a file system clean flag.) FILES
/usr/adm/wtmp, /etc/nologin, /usr/adm/authlog SEE ALSO
reboot(2), wall(1), halt(8), boot(8). AUTHOR
Edvard Tuinder (v892231@si.hhs.NL) SHUTDOWN(8)

Check Out this Related Man Page

SHUTDOWN(8)						    BSD System Manager's Manual 					       SHUTDOWN(8)

NAME
shutdown -- close down the system at a given time SYNOPSIS
shutdown [-Ddfhknprvxz] [-b bootstr] time [message ... | -] DESCRIPTION
shutdown provides an automated shutdown procedure for super-users to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties. Available friendlinesses: -b bootstr The given bootstr is passed to reboot(8) for the benefit of those systems that can pass boot arguments to the firmware. Currently, this only affects sun3 and sparc machines. -d shutdown will pass the -d flag to reboot(8) or halt(8) to request a kernel core dump. If neither the -h or -r flags are specified, then -d also implies -r. -f shutdown arranges, in the manner of fastboot(8), for the file systems not to be checked on reboot. -h The system is halted at the specified time, using halt(8). -k Kick everybody off. The -k option does not actually halt the system, but leaves the system multi-user with logins disabled (for all but super-user). -n Prevent the normal sync(2) before stopping. -p The system is powered down at the specified time, using poweroff(8). If the powerdown fails, or the system does not support soft- ware powerdown, the system will simply halt instead. -r The system is rebooted at the specified time, using reboot(8). -v To enable verbose messages on the console, pass -v to reboot(8) or halt(8). -x To enable debugging messages on the console, pass -x to reboot(8) or halt(8). -z To silence some shutdown messages on the console, pass -z to reboot(8) or halt(8). -D Prevents shutdown from detaching from the tty with fork(2)/ exit(3). time Time is the time at which shutdown will bring the system down and may be the word now or a future time in one of two formats: +number, or [[[[[cc]yy]mm]dd]hh]mm, where the century, year, month, day, and hour may be defaulted to the current system values. The first form brings the system down number minutes from the current time; the second brings the system down at the absolute time specified. If the century is not specified, it defaults to 1900 for years between 69 and 99, or 2000 for years between 0 and 68. A leading zero in the ``yy'' value is not optional. message ... Any other arguments comprise the warning message that is broadcast to users currently logged into the system. - If - is supplied as the only argument after the time, the warning message is read from the standard input. BEHAVIOR
At intervals, becoming more frequent as apocalypse approaches and starting at ten hours before shutdown, warning messages are displayed on the terminals of all users logged in. Five minutes before shutdown, or immediately if shutdown is in less than 5 minutes, logins are dis- abled by creating /etc/nologin and copying the warning message there. If this file exists when a user attempts to log in, login(1) prints its contents and exits. The file is removed just before shutdown exits. At shutdown time, a message is written in the system log containing the time of shutdown, who initiated the shutdown, and the reason. Next a message is printed announcing the start of the system shutdown hooks. Then the shutdown hooks in /etc/rc.shutdown are run, and a message is printed indicating that they have completed. After a short delay, shutdown runs halt(8) or reboot(8), or sends a terminate signal to init(8) to bring the system down to single-user mode, depending on the choice of options. The time of the shutdown and the warning message are placed in /etc/nologin and should be used to tell the users why the system is going down, when it will be back up, and to share any other pertinent information. FILES
/etc/nologin tells login(1) not to let anyone log in /fastboot tells rc(8) not to run fsck(8) when rebooting /etc/rc.shutdown System shutdown commands SEE ALSO
login(1), wall(1), fastboot(8), halt(8), init(8), poweroff(8), reboot(8), rescue(8) BACKWARD COMPATIBILITY
The hours and minutes in the second time format may be separated by a colon (``:'') for backward compatibility. HISTORY
The shutdown command appeared in 4.0BSD. BSD
October 4, 2011 BSD
Man Page