Installation guide

In each of these and similar situations a variety of options are available to
you. Regardless of how you decide to resolve the situation, your first step is
to initiate a controlled shutdown of the system. There are practical and
reasonable ways to shut down your system from single-user mode or
multiuser mode.
A system that has panicked or crashed presents you with a different set of
circumstances than a system that has shut down in an orderly fashion.
However, this chapter discusses orderly shutdowns only.
3.10 Stopping Systems While in Multiuser Mode
To shut down the system while running in multiuser mode, use the
shutdown command. When you issue the shutdown command with the -h
or -r flags, the program typically performs the following operations:
1. Runs the wall program to notify all users of the impending shutdown
2. Disables new logins
3. Stops all accounting and error-logging processes
4. Runs the killall program to stop all other processes
5. Runs the sync program to synchronize the disk(s)
6. Logs the shutdown in the log file
7. Unmounts file systems
8. Halts the system
The following sections describe typical shutdown operations and provide
examples of what happens when you use the command flags. Refer to the
shutdown
(8) reference page for more information.
3.10.1 Shutting Down the System and Warning Other Users
To shut down the system from multiuser mode to single-user mode at a
specific time and warn users of the shutdown:
1. Log in as root and change to the root directory:
# cd /
2. Use the following syntax with the shutdown command:
shutdown time
[ warning-message]
For example, to shut down the system in 10 minutes with a warning to
users that the system is going down for routine maintenance tasks, enter:
Starting Up and Shutting Down the System 3–17