30+ Linux Shortcuts

30+ Linux Shortcuts


Hotkeys can be decomposed into the following groups:

  • System-wide hotkeys
  • Keyboard shortcuts for console operation
  • X-Window System Key Combinations
  • KDE Keyboard Shortcuts

System-wide hotkeys

Ctrl + Alt + Del. In Windows, it was used to invoke the process window. Pressing Ctrl + Alt + Del again reboots the computer. In Linux. The response to pressing this combination is specified in the / etc. / initial file:

# Trap CTRL-ALT-DELETE
Ca :: ctrl alt del: / sbin / shutdown -t3 -r now

The -r option now the shutdown command means that the system needs to be rebooted (-r) now (now). You can have another command, for example, a reboot or in general, the response to Ctrl + Alt + Del can be disabled.

The next system-wide key combination is Ctrl + Alt + Backspace. Pressing this key combination will restart the X Window server if it is started.

Keyboard shortcuts for console operation

  • Virtual consoles in Linux can be several (usually 6). Alt + Fn, where n is the console number, allows you to switch between them. However, this key combination will work only if you are currently working on the console, rather than in KDE or another graphical environment. For example, you are currently working on console 1, and you need to switch to console 4, then press Alt + F4, to switch back, press Alt + F1.
  • Pressing the combination Alt + F7, as a rule, switches you to the graphical mode – the X Window.

The Tab key in the console (or terminal of the X Window System) implements the command line autocompletion. Suppose that you forgot your team name, with which you run the program you need. Tab the initial letter of the command and press Tab – the system itself will complete the command line. If after the appearance of tabulation you hear a beep, then probably several, for example, you entered yes, and the system could find two (or more) commands that start with “yes,” and she does not know which command to “enter” In the command line. In this case, press Tab again to see the entire list of commands that begin with “yes.”

You found the command you need, entered it, the program displayed some information on the screen. But the output of the program was so voluminous that it did not fit on the screen. You can, of course, redirect the output to a file or program less, but if you do not use this output in the future, you do not need to do this. Just do it with Shift + PgUp and Shift + PgDn.

X-Window System Key Combinations

  • Now you enjoy working in the X Window. But sometimes you need to switch to the console because the graphic terminal is just annoying. It can be done with the keyboard shortcut Ctrl + Alt + Fn, where n is the console number (1..6). You can switch back by pressing Alt + F7.
  • To change the resolution, you do not need to run any configurator. Just press Ctrl + “+” (on the numeric keypad) to increase the resolution (up to the maximum allowed) or Ctrl + “-” (on the numeric keypad) to decrease.

A little tip: if you have a feeble fee (for example, RivaTNT2 Vanta 8MB) and “favorite toy (clear case – tuxracer)”, reduce the resolution to 640×480.

Since in the “clean” X Window system with its standard commands, almost no one is working, I do not see the other key features. Let’s move directly to KDE.

KDE Keyboard Shortcuts

Microsoft offers to start working in Windows with the cannon Start. In KDE, a button with the inscription K (for example, with the logo of KDE itself) is used for this. If you have a large monitor (more than 19 inches or more) and you can click the mouse button to pull it from the upper-right lower-left corner, press Alt + F1, and the KDE menu appears in the current position of the mouse pointer.

If you need to run the command, press Alt + F2 to open the program launch window – type a command or select it from the list and click Run.

  • You can switch between running programs with the Alt + Tab key combination – as in Windows. If the desktop is chaotic, then it’s time to move to another desktop. Switch between the desktops by pressing Ctrl + Tab or Ctrl + Fn, where n is the number of the desktop you want. Remember that the Alt + Tab key combination works only on the current desktop. If you have a dozen programs running on the first desktop, and not a single one on the second one, when you press Alt + Tab on the second table, you will see the message “No tasks.”
  • You can view the entire list of tasks by pressing Alt + F5. If you do not like some process, you can “kill” it by calling the task manager (Ctrl + Escape).
  • Is the keyboard layout not switched in the usual way? Does it help, neither Ctrl nor Ctrl + Shift? Then press the key combination Ctrl + Alt + K. This combination will work in KDE always.

The shortcut keys for working with the clipboard are the most common – Ctrl + C (copy), Ctrl + X (cut) and Ctrl + V (paste). In addition to these three combinations, KDE provides the user with two more:

Ctrl + Alt + V – show the clipboard menu
Ctrl + Alt + R – manual” work with the clipboard

And what about working with windows? The combination Alt + F4, like in Windows, closes the window, and Alt + F3 – displays the action menu with the window.

  • Very useful is the combination Ctrl + Alt + Esc calling the xkill program. After its call, the mouse pointer turns into a skull with bones. Clicking the “skull” on some window, it will be destroyed, even if the program “hung.” To exit xkill without killing the window, press Esc.

In Windows, you could take a picture of the screen by pressing the Print Screen button. In Linux, too, this can be done, but to photograph the entire desktop, you need to press Ctrl + Print Screen, and the active window – Alt + Print Screen. After that, the resulting snapshot will be placed on the clipboard, and it can be inserted into any KDE application that supports graphics. However, I recommend taking screenshots of special programs, for example, ksnapshot. The images taken with this program will be much better than the pictures obtained in the way suggested above, and they will take up little disk space (because the ksnapshot program uses the PNG format).

A few more useful shortcuts:
Alt + PtScr + S – immediate reset of the buffer to disks
Alt + PtScr + U – immediate disconnection of disks
Alt + PtScr + B – immediate reboot (acts as a reset).

  • If suddenly there was a stiff hovering or braking (for example, due to hardware glitches), but the kernel has not yet fallen into a panic, successive pressing of these combinations with a small delay of a couple of seconds will be much safer than a reset
  • When working with the console, Ctrl + W and Ctrl + U – delete one word and an entire string, respectively.
  • In the terminal, during the execution of the program, press Ctrl-S. It pauses the output of the program.

Ctrl-Q – resume output of the program.
Alt + PtScr + K – to kill the prog, which now occupies the console. Strongly helps if fly X-sy due to the curves of firewood.
Ctrl-L to clear the terminal window.
Ctrl-A at the beginning of the line
Ctrl-E at the end of the line
Ctrl-R search by history of commands back (often used)
Esc. Insert the last argument of the last command
Ctrl-V enter the next character literally (escape)
Ctrl-K delete to the end of the line
Ctrl-U delete to the beginning of the line
Ctrl-W delete the previous word
Esc {execute file autocompletion and execute the result in braces for shell
(Try typing “ls -l. {” In the home directory)

And many, many other things. And if you do not have enough, you can add it to .inputrc.

The full list (Alt + SysRq + character) (if someone translates I will be very grateful!)

‘R’ – Turns off the raw keyboard mode and sets it to XLATE.
‘K’ – Secure Access Key (SAK) – Kill all programs on the current virtual
Console. NOTE: See the relevant comments below in the SAK section.
‘B’ – Will immediately reboot the system without syncing or unmounting
Your disks.
‘C‘ – Will perform a kexec reboot to take a crash dump.
‘D’ – Shows all locks that are held.
‘O’ – Will shut your system off (if configured and supported).
‘S’ – Will attempt to sync all mounted filesystems.
‘U’ – Will attempt to remount all mounted filesystems read-only.
‘P’ – Will dump the current registers and flags to your console.
‘T’ – Will dump a list of current tasks and their information to your
Console.

‘M’ – Will dump current memory info to your console.
‘N’ – Used to make RT tasks nice-able
‘V’ – Dumps Voyager SMP processor info to your console.
‘W’ – Dumps tasks that are in the uninterruptable (blocked) state.
‘X’ – Used by xmon interface on ppc / powerpc platforms.
‘0’‘9’ – Sets the console log level, controlling which kernel messages
Will be printed to your console. (‘0’, for example, would make
PANICs or OOPSes would
Make it to your console.)
`F’– Will call oom_kill to kill a memory hog process.
‘E’ – Send an SIGTERM to all processes, except for init.
‘G’ – Used by kgdb on PPC platforms.
‘I’ – Send an SIGKILL to all processes, except for init.
‘H’ – Will display help (actually any other key
Above will show help. But ‘h’ is easy to remember 🙂

How do I change keyboard shortcuts in KDE? Open Control Center and go to Appearance, Hot Keys (or Key bindings – in the second version of KDE).

Now we will sum up and create a table with keyboard shortcuts. Print it out and use it until you learn the combinations you need in your daily work.

Ctrl + Alt + Del System-wide System Restart
Ctrl + Alt + Backspace System-wide Server X reboot
Alt + Fn Console Switch to the console with the number n
Alt + F7 Console Go to graphical mode
Tab Console, terminal Command line autocomplete
Shift + PgUp / Dn Console Scrolling (scrolling) the program output
Ctrl + Alt + Fn-X Window Switch to the console with the number n
Ctrl + “+” (numeric keypad) X Window Increase the resolution
Ctrl + “-“ (numeric key) X Window Decrease the resolution
Alt + F1 KDE Open the KDE menu
KDE Opening the program launch window
Alt + F3 KDE Opens the action menu above the window
Alt + F4 KDE Closes the active window
Alt + F5 KDE Displays the list of windows
Ctrl + Esc KDE Window of the Task Manager window
Alt + Tab KDE Toggle between windows as part of the desktop
Ctrl + Tab KDE Switch to the next desktop
Ctrl + Fn KDE Switch to the desktop with the number n
Ctrl + Alt + K KDE Toggle keyboard layout
Ctrl + Alt + Esc KDE Abnormal shutdown of the window (program)
Alt + Print Screen KDE Snapshot of the active window
Ctrl + Print Screen KDE Snapshot of the whole desktop
ALT-Tab Gnome Task List Selection
Crtl-Alt- (F1-F12) Gnome Command prompt
Ctrl-Alt-Backspace Gnome Restart XWindows
Crtl-C Gnome Copy the selected text or region onto the clipboard
Alt- (left click mouse) Gnome To hold on to the window / GUI and move it around
Ctrl-F Gnome Switch to desktop
Alt-F2 Gnome Show the panel run application dialog
Alt-F1 Gnome Show the panel menu
Print Gnome Take a screenshot
Alt-Print Gnome Take a screenshot of a window
Ctrl-Alt-Arrow keys Gnome Switches to the workspace to the specified direction of the current workspace
Ctrl-Alt-D Gnome Minimizes all windows, and gives focus to the desktop
Ctrl-Alt-Tab Gnome Switches the focus between the panels and the desktop
Alt-F4 Gnome Closes the currently focused window
Alt-F5 Gnome Unmaximize the current window, if it is maximized
Alt-F7 Gnome Move the currently focused window
Alt-F8 Gnome Resize the currently focused window
Alt-F9 Gnome Minimize the current window
Alt-F10 Gnome Maximize the current window
Shift-Ctrl-Alt-Arrow keys Gnome Moves the current window to another workspace in the specified direction
Ctrl-N Gnome Create a new document or window
Ctrl-X Gnome Cut the selected text or region and place it on the clipboard
Ctrl-V Gnome Paste the contents of the clipboard
Ctrl-Z Gnome Undo the last action
Ctrl-S Gnome Save the current document to disk
Tab Gnome Move between controls in the interface or items in a list
Spacebar Gnome Activate or choose the selected item
F10 Gnome Activate the left-most menu of the application window
Shift-F10 Gnome Activate the context menu for the selected item
Esc Gnome Close a menu without selecting a menu item, or cancel a drag operation
Alt + ctrl + del Gnome brings up a menu with a choice of actions (reboot, shutdown, hibernate)
Ctrl + w Gnome closes the window
Ctrl + q Gnome closes the application in the majority
Ctrl + shift + q Gnome closes the terminal