How to Shutdown Xubuntu from terminal

How to Shutdown Xubuntu from terminal

Did you know that you can shutdown your computer running xubuntu through the command line/terminal? There are some command that you can use to shutdown your computer from the command line.

There are more than one command that you can use to shutdown your computer from command line, all commands required root permission though, so basically every command need to run it with sudo.

Using 'shutdown' command
The first command that you can use to shutdown/turn off your xubuntu computer is obviously the 'shutdown' command. If you run shutdown command it will not turn off your computer immediately, it will wait for few seconds before it shutdown the computer.
sudo shutdown

Here's some other parameter that you can use with shutdown command:
CommandFunction
sudo shutdown -ccanceling the shutdown command
sudo shutdown -rrestart the machine
sudo shutdown -Hhalt the machine
sudo shutdown -Ppower-off the machine
sudo shutdown -hequivalent to --poweroff
sudo shutdown -ksend warnings
sudo shutdown --no-walldon't send wall message before halt/power-off/reboot


Using 'init 0' command
If you want immediately turn off the computer, you can use the 'init 0' command, unlike 'shutdown' command which takes few seconds before shutdown, the 'init 0' command will turn off your computer instantly.
sudo init 0

Using 'halt' command
Another command for turning off computer is the 'halt' command, same as 'init 0', this command will immediately turn off your computer.
sudo halt

Using 'poweroff' command
The 'poweroff' command can also be use to turn off your computer from command line, simply run this:
sudo poweroff

Share this

Previous
Next Post »