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:
-
To stop a MySQL server instance on an Ubuntu linux install via the command line is as simple as entering: sudo /etc/init.d/mysql stop Alternatively, to st ...
-
SMS Server Tools 3 or SMS3 is a great piece of SMS Gateway open source software that allows you to send and receive short SMS messages through any number of ...
-
Changing the hostname of your Ubuntu server installation is a pretty simple affair. To view the current hostname of your system, simply enter hostname. ...
-
Installing a new software package via a command line terminal in Ubuntu Karmic Koala (and basically all the other versions preceding it) is deceptively easy ...
-
As a web developer I need to juggle a number of projects on my development machine all at once. The simple way to get around accessing these various sites i ...