Using the init and shutdown commands are the primary ways to shut down a system. Both commands perform a clean shutdown of the system, which means all file system changes are written to the disk, and all system services, processes, and the operating system are terminated normally.
Using a system's stop key sequence or turning a system off and then on are not clean shutdowns because system services are terminated abruptly. However, is it sometimes necessary to use these actions in emergency situations. See Chapter 8, Booting a SPARC System (Tasks), or Chapter 9, Intel: Booting a System (Tasks), for instructions on system recovery techniques.
There is no clean way to bring a system to run level 2 or S from run level 3 (multiuser state with NFS resources shared). The best way to bring a system to an intermediate run level is to bring the system to run level 0, and then boot the system to run level S.
Table 7-1 describes the various shutdown commands and provides recommendations for using them.
Table 7-1 Shutdown Commands
The /usr/sbin/shutdown command, not the /usr/ucb/shutdown command, is used in this chapter and throughout this book.