Home » Questions » Computers [ Ask a new question ]

How do I restart Linux (Ubuntu) from the command-line?

How do I restart Linux (Ubuntu) from the command-line?

Because of my problem with mouse-clicks being ignored in Ubuntu, I want to restart from the command-line. (I have an open Terminal, and the keyboard is not ignored.)

Asked by: Guest | Views: 99
Total answers/comments: 3
Guest [Entry]

"There's a few ways:

sudo reboot

sudo init 6

sudo shutdown -r now"
Guest [Entry]

"Occasionally, the usual (and preferred) reboot and shutdown commands don't work. I've seen this on a system with problems (which is why it needed rebooting).

You can trigger the ""Magic SysRq"" mechanism from the commandline:

echo b >/proc/sysrq-trigger

This is equivalent to alt-SysRq+b and will reboot the machine.

You may want to try ""s"" and ""u"" first to sync discs and unmount filesystems respectively."
Guest [Entry]

If you are working in Virtual Environment It will put hard disk on Standby Mode: sudo /sbin/shutdown -h now.
If you are working in Virtual Environment It will put hard disk on Standby Mode: sudo /sbin/shutdown -h now.