Linux has many keyboard shortcuts. Knowing them makes using Linux much easier.
Console/terminal
- -- - shuts down computer
- - (, , ,…) - switch to n-th console
- - or - - switch to next/previous virtual terminal
- - locks terminal input/output - allows to read console contents when output is going too fast. To unlock, press Scroll Lock once again.
Alternatively, Scroll Lock can be enabled using - and disabled with -. Try last shortcut if your console hangs for unknown reason - it happened to me many times that I’ve locked it accidentaly by pressing CTRL-S. - - and - - scrolls console buffer up/down. Works also when is enabled. After changing the terminal (-) buffer contents is erased and it is impossible to scroll it.
- - - screen refresh
- - or - - kills current task
- - - stands for EOF (End-of-file). If you type it on en empty command line, it will quit bash. This is so much faster than typing exit
- - - pause process. Use commands: bg to run in background or fg to run in foreground.
Bash & command-line
- - - moves cursor to beginning of command line.
- - - moves cursor to end of command line.
- - - clears command line from cursor position to end of line.
- - - clears command line from cursor position to beginning of line.
- - - clears word to the left
- - - will paste in anything that was deleted by - or - or -
- - command-line autocompletion. Automatically completes current command line.
If autocompletion script is enabled, then also options and applications parameters are autocompleted. - - - followed by characters will do a incremental search of the previous command history
Kernel shortcuts
Following shortcuts must be enabled in kernel, they also must be enabled using proc interface (echo 1 > /proc/sys/kernel/sysrq).
- -- - sync all mounted filesystem. Data in buffers is immediately written to disks.
- -- - remounts mounted filesystems read-only
- -- - performs immediate reboot. Don’t do it without syncing and unmounting as it can cause massive filesystem corruption
- --, then --, then -- - attempts to sync all mounted filesystems, remounts them read-only and immediately reboots computer. Fastest way to reboot Linux.
- -- - prints out list of other SysRQ functions.
X-Windows shortcuts
- -- or --- changes screen resolution (higher/lower). Only if X-Windows server is configured for multiple resolutions.
- -- - kill X-server. Running applications will be terminated.
- -- - xkill - click an application to kill it.
- -- will turn the keypad on the keyboard into the mouse, so you can control the mouse from keyboard. Keys and on the numpad select left mouse click and right mouse click respectively. Mouse click is done by on the numpad.
- -- (, , ,…) - switches to n-th text console.
KDE shortcuts
- --- - direct shutdown
- --- - direct reboot
- - - Starts the run command box. Type a application executable to launch it, folder name to open it, filename to use an appropriate program to launch it, url to go to it in konqueror and any of the numerous web shortcuts(gg, wp) defined by konqueror to activate them.
Do you know any other shortcuts that are worth to know?