Datamation Logo

Magic Tricks With the Sysreq Key

December 10, 2008
Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.
Juliet Kemp

The SysReq key is hidden up the top right of your keyboard, and looks a bit
like a relic from a former era of computing. (Which, indeed, it is.) But
there’s a bunch of things you can still do with it that may come in
handy. Note that this is documented only on i386 on Linux, and you need your kernel to
have been compiled with the “Magic SysRq Key” option. Find out if it has been
by looking at /proc/sys/kernel/sysrq — if it exists and contains
the value 1, all possible requests are allowed.

Press Alt-Sysreq, then one of the following letters:

r Unraw: Restores the keyboard after an X crash or
similar.
0 Changes console loglevel to 0 and so reduces
error messages.
k

System attention key: Kills all processes on the current

virtual console.

e Terminate: Kills all processes except init on the current
terminal.

i

Kill: Kills all processes except init, everywhere.
s Sync: Attempts to sync all mounted filesystems. Outputs OK
and Done when it’s managed. This can reduce the chances of needing to
run fsck at a later stage so it can be useful if you’re having
disk problems.
u Umount: Attempts to remount all mounted filesystems
read-only.
b Reboot: immediately reboots the system without syncing or
unmounting disks. Not a good idea unless in extremis! This may
lead to data loss.
p Dumps current registers and flags to the console.
m Dumps current memory info to the console.

If this doesn’t work, check the documentation at
/usr/share/doc/linux-doc-2.6.18/Documentation/sysrq.txt.gz for some
suggestions (including checking the keycode being sent).

This article was first published on ServerWatch.com.

  SEE ALL
ARTICLES
 

Subscribe to Data Insider

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more.

Datamation Logo

Datamation is the leading industry resource for B2B data professionals and technology buyers. Datamation's focus is on providing insight into the latest trends and innovation in AI, data security, big data, and more, along with in-depth product recommendations and comparisons. More than 1.7M users gain insight and guidance from Datamation every year.

Advertisers

Advertise with TechnologyAdvice on Datamation and our other data and technology-focused platforms.

Advertise with Us

Our Brands


Privacy Policy Terms & Conditions About Contact Advertise California - Do Not Sell My Information

Property of TechnologyAdvice.
© 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.