Skip to content

Instantly share code, notes, and snippets.

@markruler
Created August 27, 2021 04:44
Show Gist options
  • Save markruler/bd1c54ef36b9ad1ebd9b1a08a8050ead to your computer and use it in GitHub Desktop.
Save markruler/bd1c54ef36b9ad1ebd9b1a08a8050ead to your computer and use it in GitHub Desktop.
Ubuntu Shortcuts

Keyboard Shortcuts for the Terminal

Opening and Closing Terminal Windows

  • Ctrl+Alt+T or Shift+Ctrl+N: Open a terminal window.
  • Shift+Ctrl+Q: Close the current terminal window

Terminal Window Tabs

  • Shift+Ctrl+T: Open a new tab.
  • Shift+Ctrl+W Close the current tab.
  • Ctrl+Page Up: Switch to the previous tab.
  • Ctrl+Page Down: Switch to the next tab.
  • Shift+Ctrl+Page Up: Move to the tab to the left.
  • Shift+Ctrl+Page Down: Move to the tab to the right.
  • Alt+1: Switch to Tab 1.
  • Alt+2: Switch to Tab 2.
  • Alt+3: Switch to Tab 3, and so on, up to Alt+9 to switch to tab 9
  • Alt+0: Switch to Tab 10.

Command Line Editing

  • Shift+Ctrl+C: Copy the highlighted text. You must use the mouse to highlight the text.
  • Shift+Ctrl+V: Paste the copied text in a terminal window. If you are pasting into an application such as an editor, Ctrl+V will probably work.
  • Ctrl+A or Home: Go to the start of a command line.
  • Ctrl+E or End: Go to the end of a command line.
  • Alt+B or Ctrl+Left Arrow: Move the cursor backward one word.
  • Ctrl+B or Left Arrow: Move the cursor backward one character.
  • Alt+F or Ctrl+Right Arrow: Move the cursor forward one word.
  • Ctrl+F or Right Arrow: Move the cursor forward one character.
  • Ctrl+XX: Hop between the current position of the cursor and the start of the line. Hold down Ctrl and Press X twice, quickly.
  • Ctrl+D or Delete: Delete the character under the cursor.
  • Ctrl+U: Delete all characters before the cursor. Ctrl+E, Ctrl+U will delete the entire line.
  • Alt+D: Delete all characters after the cursor to the end of the line.
  • Ctrl+H or Backspace: Delete the character before the cursor.

Controlling The Terminal Display

  • Ctrl+L: Clear the terminal window. Same as typing clear.
  • Ctrl+S: Stop scrolling output. Freezes the output from a program, but allows the program to continue to run in the background.
  • Ctrl+Q: Restart scrolling output if it has been stopped with Ctrl+S.

Zooming the Terminal Window

  • Shift+Ctrl++ (that is, Shift, Ctrl and +, “the plus sign”): Zoom in.
  • Ctrl+- (that is, Shift, Ctrl and -, “the minus sign“): Zoom out.
  • F11: Full screen.
  • Ctrl+0 (that is, Ctrl and 0, “zero”): Return to normal size.

Searching in a Terminal Window

  • Shift+Ctrl+F: Find.
  • Shift+Ctrl+G: Find the next occurrence of the search term.
  • Shift+Ctrl+H: Find the previous occurrence of the search term.
  • Shift+Ctrl+J: Clear text highlights.

Desktop Keyboard Shortcuts

  • Alt+F2: Run a command. Opens the “Enter a Command” dialog. You can use this to launch applications, run commands, and run scripts.
  • Super+D: Minimizes all windows and shows the desktop.
  • Super+Tab or Alt+Tab: Switch applications.
  • Ctrl+Alt+Up Arrow: Move to the previous workspace.
  • Ctrl+Alt+Down Arrow: Move to the next workspace.
  • Shift+Ctrl+Alt+Up Arrow: Move an application to the previous workspace.
  • Shift+Ctrl+Alt+Down Arrow: Move an application to the next workspace.
  • Super+Left Arrow: Snap the current application so that it takes up the left side of the screen.
  • Super+Right Arrow: Snap the current application so that it takes up the right side of the screen.
  • Super+Up Arrow: Maximize the current application.
  • Super+Down Arrow: Restore down (that is, reduce but don’t minimize) the current application.
  • Super+M or Super+V: Display the notifications are and Calendar.
  • Super+Space: Switches between input sources. For example, if you have a laptop with a US keyboard and you also use it with an external UK keyboard, you’d find this useful.
  • Ctrl+Alt+L: Locks the screen so that you need to log back in. Makes it safe to leave your computer unattended.
  • Ctrl+Alt+Del: Logs you out of the current session.

Common Application Keyboard Shortcuts

  • Ctrl+Q or Ctrl+W or Alt+F4: Close application.
  • Ctrl+P: Open the Print dialog.
  • Ctrl+S: Save the current file.
  • Shift+Ctrl+S: Open the File Save dialog.
  • Ctrl+O: Open the Open File dialog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment