HP-UX System Administrator's Guide: Routine Management Tasks

2. Once everyone has been notified and had a chance to prepare for the shutdown,
execute the shutdown command to initiate an ordered shutdown of your system.
There are basically three types of system shutdown:
1. Shutdown with immediate reboot (useshutdowns -r option)
2. Shutdown with system halt (use shutdowns -h option)
3. Put system in single-user mode for system maintenance (use neither the -r
nor the -h option)
Common Variations of the shutdown Command Here are some examples of
shutdown commands to show you each type of system shutdown. shutdown is
by default an interactive program. Other than telling shutdown whether or not
you want to halt or reboot the system, information omitted from the command
line will be prompted for. If you do not tell shutdown that you want to halt or
reboot the computer, it will assume that you want to bring the system to single-user
mode.
Example 2-26 Shutdown and Reboot
To immediately shut down the system and reboot it:
/sbin/shutdown -r 0
Example 2-27 Shutdown and Reboot with Wait
To shut down the system and immediately reboot it after first giving the users of
the system three minutes (180 seconds) to clean up their work-in-progress and log
out:
/sbin/shutdown -r 180
Example 2-28 Shutdown and Halt
To immediately shut down the system and halt it so that it can safely be powered
off:
/sbin/shutdown -h 0
Example 2-29 Shutdown to Single-User Mode
To shut the system down to single-user mode, use neither the -h or the -r options
to the shutdown command. A grace period is allowed: in this example seven
minutes (420 seconds):
/sbin/shutdown 420
Shutting Down Systems 87