Shutdown in Linux and Solaris CLI

To shut a system down, one of two commands are typically used: shutdown or init. Both commands perform a clean shutdown of the system. Both start processes that write all file system changes to disk and terminate all system services, processes, and the OS.

  • shutdown is typically used on systems running in the multiuser state. If used without options, the command brings the systems to run level S (single-user) by default.
  • init is best used on stand-alone systems where other users are not affected by any shutdown. It does not send out notifications about the pending shutdown and completes the shutdown process faster.

The following table describes the various shutdown commands used in Linux / Solaris OS and provides recommendations for using them:

CommandDescriptionWhen to Use
shutdownAn executable that calls the init program to shut down the system. The system is brought to run level S by default.Use this command to shut down servers that are operating at run level 3.
initAn executable that terminates all active processes and synchronizes the disks before changing run levels.This command provides a faster system shutdown. The command is preferred for shutting down stand-alone systems when other users will not be affected.
rebootAn executable that synchronizes the disks and passes boot instructions to the uadmin system call. In turn, this system call stops the processor.The init command is the preferred method.
halt, poweroffAn executable that synchronizes the disks and stops the processor.Not recommended because it does not shut down all processes or unmount any remaining file systems. Stopping the services, without doing a clean shutdown, should only be done in an emergency or if most of the services are already stopped.
Various Shutdown Commands

Leave a Comment