How to shutdown, reboot and logout the system from the command-line

command linelogoutrebootshutdown

I would like to do that using the command-line, because sometimes my computer freezes and I need to force a shutdown (I know it's not good to the hardware).
And: What is the difference between Halt and Shutdown commands?

Best Answer

Using the commands shutdown and reboot respectively. To log off from a terminal you can press Ctrl-D or type exit.

Related Question