There are several low level shortcuts that are implemented in the kernel which can be used for debugging and recovering from an unresponsive system. Whenever possible, it is recommended that you use these shortcuts instead of doing a hard shutdown (holding down the power button to completely power off the system).
To use these, they must first be activated with either sysctl kernel.sysrq=1
or echo "1" > /proc/sys/kernel/sysrq
. If you wish to have it enabled during boot, edit /etc/sysctl.d/99-sysctl.conf
and insert the text kernel.sysrq = 1
. If you want to make sure it will be enabled even before the partitions are mounted and in the initrd, then add sysrq_always_enabled=1
to your kernel parameters.
A common idiom to remember this is "Reboot Even If System Utterly Broken" (also referred to as "REISUB"). Alternatively, think of it as "BUSIER" backwards.
Keyboard Shortcut | Description |
---|---|
Alt+SysRq+r Unraw | Take control of keyboard back from X. |
Alt+SysRq+e Terminate | Send SIGTERM to all processes, allowing them to terminate gracefully. |
Alt+SysRq+i Kill | Send SIGKILL to all processes, forcing them to terminate immediately. |
Alt+SysRq+s Sync | Flush data to disk. |
Alt+SysRq+u Unmount | Unmount and remount all filesystems read-only. |
Alt+SysRq+b Reboot | Reboot |
See Wikipedia:Magic SysRq key for more details.
Keyboard Shortcut | Description |
---|---|
Ctrl+Alt+Del | Reboots Computer (specified by the symlink /usr/lib/systemd/system/ctrl-alt-del.target ) |
Alt+F1 , F2 , F3 , ... | Switch to n-th virtual console |
Alt+ ← | Switch to previous virtual console |
Alt+ → | Switch to next virtual console |
Scroll Lock | When Scroll Lock is activated, input/output is locked |
Shift+PgUp /PgDown | Scrolls console buffer up/down |
Ctrl+c | Kills current task |
Ctrl+d | Inserts an EOF |
Ctrl+z | Pauses current Task |
GNU readline is a commonly used library for line-editing; it is used for example by Bash, FTP, and many more (see the details of readline package under "Required By" for more examples). readline is also customizable (see man page for details).
Keyboard Shortcut | Description |
---|---|
Ctrl+l | Clear the screen |
Cursor Movement | |
Ctrl+b | Move cursor one character to the left |
Ctrl+f | Move cursor one character to the right |
Alt+b | Move cursor one word to the left |
Alt+f | Move cursor one word to the right |
Ctrl+a | Move cursor to start of the line |
Ctrl+e | Move cursor to end of the line |
Copy & Paste | |
Ctrl+u | Cut everything from line start to cursor |
Ctrl+k | Cut everything from the cursor to end of the line |
Alt+d | Cut the current word after the cursor |
Ctrl+w | Cut the current word before the cursor |
Ctrl+y | Paste the previous cut text |
Alt+y | Paste the second latest cut text |
Alt+Ctrl+y | Paste the first argument of the previous command |
Alt+. /_ | Paste the last argument of the previous command |
History | |
Ctrl+p | Move to the previous line |
Ctrl+n | Move to the next line |
Ctrl+s | Search |
Ctrl+r | Reverse search |
Ctrl+j | End search |
Ctrl+g | Abort search (restores original line) |
Alt+r | Restores all changes made to line |
Completion | |
Tab | Auto-complete a name |
Alt+? | List all possible completions |
Alt+* | Insert all possible completions |
Keyboard Shortcut | Description | Notes |
---|---|---|
Ctrl+Alt+F1 , F2 , F3 , ... | Switch to n-th virtual console | If it does not work, try Ctrl+Fn+Alt+F… . |
Shift+Insert Mouse Button 2 | Paste text from the PRIMARY buffer | By default, Qt maps Shift+Insert to CLIPBOARD instead of the PRIMARY buffer (see e.g. [1]) and Ctrl+Shift+Insert is mapped to the PRIMARY buffer. |
More reference: https://wiki.archlinux.org/index.php/Keyboard_shortcuts