Showing posts with label sysrq. Show all posts
Showing posts with label sysrq. Show all posts

Sunday, November 11, 2007

Linux is fun for me

Do you've a SysRQ button on your keyboard? No. You must've the PrintScreen button, next to Scroll Lock? Yes. Then you can try out kernel keyboard shortcuts.

The fastest (and most unsafe) way to reboot your computer is
to press these these combinations, one after one.
Alt+SysRQ+s - Sync data to disks for all mounted disks immediately.
Alt+SysRQ+u - Remount all filesystems as readonly.
Alt+SysRQ+b - Reboot immediately.

There're a lot of kernel functions availible, depending upon your kernel version.
You can find them in kernelsource/Documentation/sysrq.txt file.

You can enable all of kernel functions by,
echo 1 >/proc/sys/kernel/sysrq


Pressing Alt+SysRQ+h should tell you about various sysRQ functions availible (in dmesg output). For example, on my system (Feisty Fawn), they are
SysRq : HELP : loglevel0-8 reBoot Crashdump tErm Full kIll saK showMem Nice powerOff showPc unRaw Sync showTasks Unmount shoW-blocked-tasks

The saK (secure access key) can be used to allow secure login. The output of kernel functions, if any, goes to /var/log/messages (or dmesg).