<p>In response to JWP's <a href="https://hackerpublicradio.org/eps.php?id=2697" target="_blank">episode 2697</a> and <a href="https://hackerpublicradio.org/eps.php?id=2697#comments" target="_blank">ClaudioM's comment</a>, this show covers the <code>shutdown</code> command as it appeared in Sun Solaris and OpenSolaris, and currently appears in both Oracle Solaris and <a href="https://openindiana.org" target="_blank">OpenIndiana</a>.

<p>
The quick version&#58;
</p>

<ul>
<li><code>shutdown</code></li>
<li><code>-i</code> sets the destination init state (5 to shutdown, 6 to reboot, and so on; see <code>man init</code> for more)</li>
<li><code>-y</code> to answer "yes" to the safeguard prompt asking you whether you really want to shutdown</li>
<li><code>-g</code> to set how many seconds until shutdown. Default is 60.
</li>
</ul>

<p>In practise, I don't even use the shutdown command. I use <code>poweroff</code>, which does a shutdown and poweroff.</p>

<p>
Both shutdown and poweroff require root permission. On OpenIndiana, you can either use <code>sudo bash</code> or <code>pfexec bash</code> to get a root prompt.
</p>

<p>Some links&#58;</p>
<p><a href="https://docs.openindiana.org/handbook/common-tasks/#system-shutdown-reboot" target="_blank">OpenIndiana handbook</a></p>
<p><a href="https://docs.oracle.com/cd/E23824_01/html/821-1451/gldpm.html" target="_blank">Sun Microsystem docs</a> (with Oracle branding on it)</p>


