Ubuntu – How to shut down or reboot from a terminal

command linerebootshutdown

How can I shut down or reboot Ubuntu using terminal commands?

Best Answer

For shutdown:

sudo poweroff

For restart:

sudo reboot

Appendix: If your keyword is "lockup" so you can't enter a command like "reboot" which would run from "su" anyway, use the keyboard: hold down Alt + PrintScreen/SysRq, buttons and type "REISUB". It doesn't have to be capital letters. It will restart your computer gently. http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

Related Question