Oracle SolarisSolaris 11Solaris 11.3Solaris 11.4

shutdown vs init command Solaris

In this tutorial, we will learn what is the difference between different system shutdown commands used in Oracle Solaris operating system which are being used by System Administrators.

System Administrators perform many tasks in their routine work. Shutting down or rebooting the system is one of those tasks, and It is one of the risky tasks for them because sometimes the system won’t come back due to some reasons and they need to spend more time on it to troubleshoot.

Today we will learn about these shutdown commands available in Oracle Solaris operating system so that Administrators can choose the appropriate command to perform the task based on their requirements.

Shutdown Commands

To shut an oracle 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.

Learn more about Solaris Run Levels here.

For example, to reboot the system using shutdown command, use below command:

# shutdown -i S -g 120 "===== disk replacement ====="
shutdown command -
shutdown command
Here State s (or S) is referred to as the single-user state. All user processes are stopped on transitions to this state. In the single-user state, file systems required for multi-user logins are unmounted and the system can only be accessed through the console. Logins requiring access to multi-user file systems cannot be used.

In the example, the shutdown command is being scheduled in 120 seconds. The warning message is output 2 minutes, 1 minute, and 30 seconds before the final confirmation message.

shutdown broadcast message -
shutdown command broadcast message

Various shutdown commands

The following table describes the various shutdown commands used in 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.

Reference Links:-

0 0 votes
Article Rating

Prashanth Nimesh

I have passed B.Tech in Computer Science and currently working as a System Administrator with over 4 years of experience in the IT field. I am also the creator of the theGeeksHub website and its main contributor.

Related Articles

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Back to top button