preferred shutdown method

Kenyon Ralph kenyon at
Tue Nov 23 08:32:52 UTC 2010

On 2010-11-23T13:52:17+0530, Kaushal Shriyan <kaushalshriyan at> 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
> Shutdown:
>     * 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
the following:

    shutdown -h -P now

To halt:

    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

Kenyon Ralph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <>

More information about the ubuntu-server mailing list