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:
Command | Function |
---|---|
sudo shutdown -c | canceling the shutdown command |
sudo shutdown -r | restart the machine |
sudo shutdown -H | halt the machine |
sudo shutdown -P | power-off the machine |
sudo shutdown -h | equivalent to --poweroff |
sudo shutdown -k | send warnings |
sudo shutdown --no-wall | don'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.
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