Keep the following in mind when shutting down a system:
Use the init and shutdown commands to shut down a system. Both commands perform a clean system shutdown, which means all system processes and services are terminated normally.
Use the shutdown command to shut down a server, because logged-in users and systems mounting resources from the server are notified before the server is shut down. Additional notification of system shutdowns via electronic mail is also recommended so that users can be prepared for system downtime.
You need superuser privileges to use the shutdown or init command to shut down a system.
Both shutdown and init commands take a run level as an argument. The three most common run levels are:
Run level 3 - Means that all system resources are available and users can log in. By default, booting a system brings it to run level 3, which is used for normal day-to-day operations. Also known as multiuser level with NFS resources shared.
Run level 6 - Stops the operating system and reboots to the state defined by the initdefault entry in the /etc/inittab file.
Run level 0 - Means the operating system is shut down and it is safe to turn off power. Bringing a system to run level 0 is needed whenever the system is moved or hardware is added or removed.
Run levels are fully described in Chapter 6, Run Levels and Boot Files (Tasks).