preferred shutdown method
kenyon at kenyonralph.com
Tue Nov 23 08:32:52 UTC 2010
On 2010-11-23T13:52:17+0530, Kaushal Shriyan <kaushalshriyan at gmail.com> wrote:
> Which is the preferred method of shutdown of a Linux Server and any
> specific reason to go with the specific method.
> Please suggest/guide
> * init 0
> * shutdown -h now
> o -a: Use file /etc/shutdown.allow
> o -c: Cancel scheduled shutdown.
> * halt -p
> o -p: Turn power off after shutdown.
> * poweroff
I think 'shutdown' is the most correct and portable way to do it (for
example, on FreeBSD, 'shutdown' runs all the proper service stop
scripts, whereas 'reboot' doesn't). In particular, to power off, use
shutdown -h -P now
shutdown -h -H now
And to reboot:
shutdown -r now
I have seen a machine act differently when given "shutdown -h now"
versus the full (as documented in the manual page) "shutdown -h -P
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the ubuntu-server