Printable Linux cheat sheet

GNOME and Ubuntu desktop shortcuts

Super is usually the Windows-logo key. In GNOME Settings, open Keyboard and select View and Customize Shortcuts to check your bindings.

ShortcutAction
Super Open or close the GNOME Activities overview
Super + L Lock the screen in GNOME
Super + Tab Switch between open apps
Super + Left / Right Tile the active window on the left or right
Super + Page Up / Page Down Move to the workspace on the left or right
Super + Space Switch to the next configured input source
Print Screen Open GNOME’s screenshot tool
Ctrl + Alt + T Open the default terminal on Ubuntu Desktop

KDE Plasma desktop shortcuts

Plasma calls the Windows-logo key Meta. Open System Settings and search for Shortcuts to check or change your bindings.

ShortcutAction
Ctrl + F12 Show or hide the desktop with Plasma’s Peek at Desktop shortcut
Ctrl + F1 to F4 Switch to virtual desktop 1 through 4 if it exists
Meta + Page Up Maximize or restore the active window
Meta + Page Down Minimize the active window

Graphical app editing shortcuts

These conventions apply in many Linux desktop apps. The current app’s menu lists its bindings.

ShortcutAction
Ctrl + A Select all items or text
Ctrl + C Copy selected text, image, or file to the clipboard
Ctrl + N Start a new document or open a new window, depending on the app
Ctrl + P Print the current document
Ctrl + Q Quit the application in focus
Ctrl + S Save the currently opened file
Ctrl + V Paste copied text, image, or some other object from the clipboard
Ctrl + W Close the current tab or document in apps that support it
Ctrl + X Cut selected text, image, or file
Ctrl + Z Undo the last action

Virtual console shortcuts

Virtual console and graphical session numbers depend on your distribution and display manager.

ShortcutAction
Ctrl + Alt + F1 through F6 Switch to the selected virtual terminal where the binding is enabled
Ctrl + Alt + F7 Return to the graphical session on systems where it runs on virtual terminal 7

GNOME Terminal shortcuts

These shortcuts control the terminal window and its tabs. Open Preferences, then Shortcuts, to see or change them.

ShortcutAction
Ctrl + Shift + C Copy selected terminal text
Ctrl + Shift + V Paste text from the clipboard
Ctrl + Shift + T Open a new terminal tab
Ctrl + Shift + W Close the current terminal tab
Ctrl + Page Up / Page Down Switch to the previous or next terminal tab
Ctrl + Shift + F Search the text in the terminal

Bash history expansions

These text patterns expand past commands in interactive Bash when history expansion is enabled. Review the expanded command before running it.

ShortcutAction
!! Substitute the entire previous command line
!$ Substitute the last word of the previous command
!^ Substitute the first argument of the previous command
!prefix Recall the latest command starting with the given text. For example, !ping finds a command that starts with ping

Bash command-line editing shortcuts

These are default Emacs-style Readline bindings. If the terminal intercepts Alt, try pressing Esc before the next key.

ShortcutAction
Alt + . Insert the last argument of the previous command
Alt + < Go to the first line of the bash history
Alt + > Return to the current input line after the last history entry
Alt + ? List the available completions for the current input
Alt + B Move the cursor one word backward
Alt + Backspace Remove the word before the cursor or the portion before the cursor within a word
Alt + D Remove text from the cursor to the end of the current or next word
Alt + F Move the cursor one word forward
Alt + P Search backward for the typed text. Repeat for a previous match
Alt + R Undo all edits to the current input line
Alt + T / Esc then T Swap the words around the cursor. At the end of the line, swap the last two words
Alt + C Capitalize the current or next word
Alt + L Lowercase the rest of the current or next word
Alt + U Uppercase the rest of the current or next word
Ctrl + Underscore Undo the previous edit on the current line
Ctrl + A Move the cursor to the beginning of the line
Ctrl + E Move the cursor to the end of the line
Ctrl + B Move one character backward
Ctrl + F Move one character forward
Ctrl + D Delete the character at the cursor. At an empty prompt, send end-of-input, which usually exits Bash
Ctrl + G Cancel the active history search
Ctrl + H Delete the character before the cursor
Ctrl + K Erase everything from the current cursor position to the end of the line
Ctrl + U Remove text from the cursor to the start of the line
Ctrl + L Clear the display and redraw the current prompt line
Enter / Ctrl + J / Ctrl + M Submit the current line
Ctrl + P / Up Recall the previous history entry
Ctrl + N / Down Recall the next history entry
Ctrl + O Run the recalled line, then load the next history entry for editing
Ctrl + R Search backward through history as you type
Ctrl + T Swap characters around the cursor. At the end, swap the final two characters
Ctrl + W Remove the word before the cursor, using spaces as word boundaries
Ctrl + X then Ctrl + X Swap the cursor position with the saved mark
Ctrl + Y Insert the most recently removed text from the Readline kill ring
Ctrl + [ Send Escape, which can prefix a Readline shortcut
Tab / Ctrl + I Try to complete the command, option, variable, or path at the cursor

Terminal control shortcuts

Terminal driver settings and application settings can alter these bindings.

ShortcutAction
Ctrl + C Interrupt the foreground process with SIGINT or cancel the current prompt input
Ctrl + Q Resume terminal output when software flow control is enabled
Ctrl + S Pause terminal output when software flow control is enabled
Ctrl + Z Suspend the foreground job when job control is enabled

Examples and troubleshooting

Look up a desktop shortcut on your machine

In GNOME, open Settings, choose Keyboard, and select View and Customize Shortcuts. In KDE Plasma, search for Shortcuts in System Settings. Look up the action by name and check the assigned keys. If the combination only misbehaves in one app, check that app’s menus or shortcut settings too.

Take a screenshot in GNOME

Press Print to open the capture overlay. Choose an area, a single window, or the full screen. GNOME copies the screenshot to the clipboard for pasting into a message and saves a file under Pictures > Screenshots. If Print invokes another tool, check the Screenshots category in GNOME’s shortcut settings.

Copy terminal output or stop a command

Select the text in GNOME Terminal and press Ctrl + Shift + C to copy it. Use Ctrl + Shift + V to paste there. Ctrl + C usually sends an interrupt to the running program. At a Bash prompt, Ctrl + R searches your command history as you type, and Ctrl + G cancels the search. Read the recalled line before running it, especially if it contains file paths.

Sources and corrections

Guide updated .

Report a shortcut correction with the key combination, app, and OS version.