To shut down a Solaris UNIX system, you can use the init
command with the appropriate run-level. The init
command is used to change the run-level of the system.
To shut down the system immediately, use the following command as the root user:
init 5
This command changes the run-level to 5, which is the run-level used for shutting down the system.
You can also use the shutdown
command to shut down the system. The shutdown
command provides options for specifying a delay before shutting down, as well as broadcasting a message to all logged in users. For example, to shut down the system immediately with a broadcast message, use the following command:
shutdown -i 5 -g0 -y
This command broadcasts a message to all logged in users indicating that the system is about to shut down, waits for 5 seconds, and then shuts down the system.
Note that shutting down a system can cause data loss and should be done with care. Always make sure that any important data has been saved and that all running processes have been stopped before shutting down the system.