Ubuntu: How to Reboot or Shutdown from the Command Line CodeUnit 10 JAN 2010

If you’re using Ubuntu or perhaps another flavour of Linux, there come a time when you need to either reboot (restart) or shutdown a machine via a terminal (command line) or shell command.

Of course, it does come as no surprise that in order to carry out either of these two commands, you will need administrator privileges on the machine that you are currently using, in other words, sudo is once more you best friend.

To shut down / power off your Ubuntu PC, type in the command:

sudo halt

or

sudo shutdown -h now

Alternatively, to restart / reboot your machine, enter the command:

sudo reboot

As always, more information on both of these commands can be found via the man system:

man reboot

man shutdown

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.