Ubuntu: How to Reboot or Shutdown from the Command Line

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

You might also enjoy:

About Craig Lotter

Craig Lotter is an established web developer and application programmer, with strong creative urges (which keep bursting out at the most inopportune moments) and a seemingly insatiable need to love all things animated. Living in the beautiful coastal town of Gordon's Bay in South Africa, he games, develops, takes in animated fare, trains under the Funakoshi karate style and for the most part, simply enjoys life with his amazing wife and daughter. Oh, and he draws ever now and then too.
This entry was posted in Software & Websites, Tutorials and tagged , , reboot, , shutdown, , . Bookmark the permalink.
    blog comments powered by Disqus