How to Be More Productive in Ubuntu Using Keyboard Shortcuts
We’re always looking for new ways to speed up everyday tasks in Ubuntu. We’ll show you some keyboard shortcuts you might not have known about, and show you how to make your own custom shortcuts.
When Keyboards Ruled the Earth
Unix—the spiritual predecessor of Linux predates graphical user interfaces. The keyboard was the only game in town, so it was typing all the way. No surprise then, that functionality was soon introduced for the benefit of the computer operators of yesteryear.
Features such as the
history command and aliases started to appear in Unix shells. Their purpose was to increase productivity by reducing repetition and removing the need to remember obscure sequences of commands.
Keyboard shortcuts boost efficiency, too. These are neat combinations of keystrokes that trigger some useful action for us. They don’t type text, they cause something to happen.
We’re going to look at some of the more useful Ubuntu keyboard shortcuts, both for the terminal and on Ubuntu’s GNOME Shell desktop. We’ll also demonstrate how to create your own shortcuts by applying the keystrokes of your choice to the action you want to perform. We tested this keyboard shortcuts on Ubuntu 19.04 Disco Dingo.
The Super key is the one between the Ctrl and Alt keys toward the bottom left corner of the keyboard. On most keyboards, this will have a Windows symbol on it in other words, “Super” is an operating system-neutral name for the Windows key. We’ll be making good use of the Super key.
Keyboard Shortcuts for the Terminal
The following keyboard shortcuts work in GNOME Terminal Ubuntu’s built-in terminal application. If they don’t seem to work, click menu > Preferences > Shortcuts in a Terminal window and ensure “Enable Shortcuts” is checked.
Use these keyboard shortcuts to speed up your Linux command line experience:
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
- 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.
For more keyboard shortcuts, check out our list of Bash shortcuts these work in any Linux terminal, even outside of the desktop.
RELATED: The Best Keyboard Shortcuts for Bash (aka the Linux and macOS Terminal)
Desktop Keyboard Shortcuts
Ubuntu’s GNOME desktop environment offers many different keyboard shortcuts for navigating your desktop and working with windows, too. If you’re still doing all these things the long mouse-driven way, stop!
- 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
Many applications follow certain conventions with keyboard shortcuts. These should work in most modern applications.
- 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.
How to Create Custom Keyboard Shortcuts
You can create your own keyboard shortcuts and attach them to some action you wish to have carried out when that keyboard shortcut is used.
To create your own keyboard shortcut, open the “System Menu” and click on the “Settings” icon:
In the “Settings” dialog, click on the “Devices” menu entry. This is near the bottom of the sidebar.
Click on the “Keyboard” menu entry.
Scroll down through the list of existing keyboard shortcuts, and click the “+” button at the bottom of the list.
In the “Add Custom Shortcut” dialog, give your new shortcut a descriptive name in the “Name” field.
In the “Command” field, provide the command that you wish to have executed when your shortcut is used.
In this example, we’re going to launch Nautilus. We need to type the command that will launch Nautilus, which is “
When you have filled in the “Name” and “Command” fields, click the “Set Shortcut” button. When you see the “Enter the New Shortcut” prompt, press the keys you wish to use for the shortcut.
In our example, we will press Super+E.
When all fields are completed, click the green “Add” button. This will save your shortcut and add it to the list of existing shortcuts.
If you scroll down through the list of existing shortcuts you’ll see a new section titled “Custom Shortcuts”. Your new shortcut will be listed in that section.
And now, pressing Super+E will launch Nautilus. Close the window, and test out your shortcut! It’ll become second nature in no time.
While you’re in the Keyboard Shortcuts window, be sure to look through the list and change shortcuts as you see fit! If your keyboard doesn’t have media keys, for example, you can assign one of the F-keys to volume up and volume down.
Custom shortcuts aren’t just for opening your favorite programs quickly. You can write a short script to automate some common task and bind that script to a keystroke! The possibilities are endless.
Using Your Shortcuts
Keyboard shortcuts can leave you in a quandary. When you start using them, they slow you down! Because they are unfamiliar and they take a moment to look up, they can feel like an impediment more than an accelerator.
Don’t be disheartened, persevere. There’s no instant gratification here. But once you have them locked into your muscle memory, you’re up and running.
Pick a handful and start to use those. When they become second nature, add a few more. Then repeat. You’ll wonder how you ever managed without them. It’s like learning the Linux terminal.