Friday, August 15, 2008

What is the equivalent of Ctrl-Alt-Del in Ubuntu

Press the Alt+PrntScrn(SysRq) keys and hold them down while you type each of the following keys in order: R-E-I-S-U-B

R switch the keyboard mode
E send all processes the SIGTERM singal
I sends all processes the SIGKILL signal
S Sync filesystem
U Unmount all devices
B reboots the system (typing O instead will turn the computer Off)

Theoretically you could just do Alt+SysRq+B to do an old school, Win 95 style Ctrl+Alt+Del reboot, but it’s just as bad as hitting that power button. Your best bet is to run the whole sequence to ensure that the system shuts down in the way it would normally shut down when you issue a reboot command.

And it’s almost guaranteed to work even on a completely locked up system. That is, if it’s enabled on your system. If you are not sure, do a really quick test right now:

cat /proc/sys/kernel/sysrq

If you see a 1, you are in good shape.
If you see a 0 (zero), you can enable the SysRq keys by doing:

sudo echo 1 > /proc/sys/kernel/sysrq

2 comments:

Dennis van Leeuwen said...

I think you need three hands to do this :-)

Bucknasty said...

Ha Ha... Lucky it's not needed much in Linux - Unlike Winblows.