Gracefully Reboot Ubuntu/Mint/Debian (and perhaps others)

There you are, staring at a crashed Gnome session.

CTRL-ALT-BKSPC

does nothing.

CTRL-ALT-F1

won’t bring you to a terminal where you could

cd to /etc/init.d
and
restart gdm

In short, your choices seem to be limited to holding down the power button and chancing file system corruption or nothing.

But wait!
There are two more options that you may not have known about!

Here are two ways to first try and kill just the process on your current terminal (thus allowing you to get back into your machine and at least attempt)

shutdown -h now

and if that fails, to bring your machine down in a more graceful manner than a hard shutdown.

First, we’ll try and kill all the process on your current terminal. To do this, hold down the following keys –

ALT + SysReq + k

What the heck is a SysReq key? Look for it on your PrtSc or Print Screen key. (On laptop keyboards, the key may not be labelled with SysReq, but it will likely work anyway.)

The k in this instance stands for Kill.

If that doesn’t work for you, it’s time to take drastic action. You’ll now enter a series of keystrokes that will tell your computer to do some housekeeping before shutting down.

ALT + SysReq + r

This stands for Raw keyboard mode.

ALT + SysReq + e

This terminates all processes

ALT + SysReq + i

Kill’s all processes that weren’t terminated nicely.

ALT + SysReq + s

This syncs the disk.

ALT + SysReq + u

Remounts all filesystems as read only.

ALT + SysReq + b

Reboots.

That’s a heck of a lot better than simply holding down the power button and hoping everything works out okay.

How will you ever remember all those keystrokes?
There is a long held mnemonic that makes it a bit easier:

Raising Elephants Is So Utterly Boring – REISUB
or perhaps it is easier to remember that it spells BUSIER backwards!

You should use this method only if other methods (mentioned above) fail.