1

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

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.

  • The right terminology in this case is 'reboot', not 'restart'. – Radu Rădeanu Jul 10 '14 at 8:43
  • I guess Ubuntu is wrong – duxk.gh Jul 27 '14 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. – Radu Rădeanu Jul 27 '14 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.