Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Booting and Shutdown
Shutting Down Systems
Chapter 5524
Example 5-31 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 5-32 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
Example 5-33 Reboot NFS Cluster Server
To reboot an NFS cluster server system without also shutting down its
clients:
/sbin/shutdown -o -r
NOTE You must have permission to shut down an HP-UX system! Obviously,
this command can have serious consequences and is therefore to be used
with caution. It is not a command that everyone should be able to use.
Permission to shut down the system is normally reserved for superusers
only. However, there is a mechanism that you can use to assign
permission to other users so that they can shut down the system should
the need arise when a superuser is not around. The
/etc/shutdown.allow file enables superusers to specify who has
permission to shut down the system in their absence. For details, see the
shutdown (1M) manpage.
When run, shutdown ensures an orderly shutdown of the system by
doing the following:
• Resets the PATH environment variable to the value:
/usr/bin:/usr/sbin:/sbin
• Resets the IFS environment variable to the value:
space tab newline