2

What's the difference between shutdown -r and shutdown -P?

3 Answers 3

6

You can get information about commands by typing:

man <command>

For the shutdown command you get:

OPTIONS
   -r     Requests that the system be rebooted after it has been brought down.

   -h     Requests that the system be either halted or powered off after it has been brought down, with  the  choice  as  to
          which left up to the system.

   -H     Requests that the system be halted after it has been brought down.

   -P     Requests that the system be powered off after it has been brought down.

   -c     Cancels a running shutdown.  TIME is not specified with this option, the first argument is MESSAGE.

   -k     Only send out the warning messages and disable logins, do not actually bring the system down.
4

The shutdown process normally takes 30 seconds to allow each running service time to stop. Services are shutdown in alphabetical order.

-r Reboot the system when shutdown is complete.

-p Turn off the system without time-out or warning similar to -h

-2

shutdown -p will power off your system.

shutdown -r will restart it.

3
  • The right terminology in this case is 'reboot', not 'restart'. Jul 10, 2014 at 8:43
  • I guess Ubuntu is wrong
    – duxk.gh
    Jul 27, 2014 at 17:50
  • No, Ubuntu is perfectly right in that case :). The term restart is used to refer to a reboot when the operating system closes all programs and finalizes all pending input and output operations before initiating a soft reboot (source: wikipedia). But 'restart' is vague, and can also mean a reload of the current operating system without the boot loader - and because of this man shutdouwn use the term reboot for -r option. Jul 27, 2014 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .