8 ms·
The Linux console does support a secure attention key that can't be trapped and will kill any process which has /dev/console open. root can configure it with /
by caf 9y ago
The Linux console does support a secure attention key that can't be trapped and will kill any process which has /dev/console open. root can configure it with /sbin/loadkeys.
Not sure how distributions tend to configure it by default.
- yorwba 9y agoI just looked at the table with dumpkeys, but I'm not sure what I'd have to look for to identify that key. sudo dumpkeys | rg --only-matching '=.*' | sort | uniq doesn't show anything that stands out, except maybe for Boot and Break. (But I guess that's a line break?) What would the key do when pressed?
- caf 9y agoThe key will kill any process with the console open (which should then cause login to respawn) and log the killed processes. If you want to test it then this will set Ctrl-Alt-Esc as your SAK: echo "control alt keycode 1 = SAK" | loadkeys
- AstralStorm 9y agoIf magic sysrq is enabled, this is alt+sysrq+k. (Usually sysrq is same key as printscreen)