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: 340
Total answers/comments: 3
bert [Entry]

"There's a few ways:

sudo reboot

sudo init 6

sudo shutdown -r now"
bert [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."
bert [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.