Shut Down a Solaris UNIX System

How do I shutdown a Solaris UNIX machine or server using command prompt?

You need to use the shutdown command as follows (you must login as root):
# shutdown -y -g0 -i S
The following command will scheduled a shutdown in 180 seconds and will display message “Memory upgrade, save all data ” to all logged in members:

ADVERTISEMENTS

shutdown -i S -g 180 "***  Memory upgrade, save all data ***"

The shutdown command can be aborted before completing 180 seconds counter.

poweroff Command

You can also use the poweroff command its is equivalent init 5:
# poweroff
OR
# init 5

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
1 comment… add one
  • Vahid Shokouhi Oct 23, 2012 @ 19:24

    Hi. I think it’s better not to use ‘poweroff’ unless it’s an urgent, and use “shutdown” instead. “shutdown” uses SMF (Service Management Facility) to take care of it. SMF starts to terminate services in reverse-order pattern which means a service got terminated before the services it depends on. Then the kernel flushes file system’s buffer and powers off the machine. The “init” command behaves as the same.
    “poweroff” and “halt” commands, ignore SMF and terminate(better say kill) the services in two steps. First, they send out SIGTERM signal, that kills some services, and after about 5 seconds, they kill the rest with SIGKILL. Since, there is not enough time for services and kernels to fulfill their jobs, some data might be lost since they couldn’t get written on nonvolatile memory.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.