How to Create a Custom Keyboard Shortcut in Ubuntu Linux

If you find yourself opening the terminal, launching a specific application, or running a complex bash script multiple times a day, you can save massive amounts of time by assigning these actions to a custom keyboard shortcut. Ubuntu makes it incredibly easy to bind any command to a combination of keystrokes.

How to Assign a Custom Shortcut

  1. Open the Settings app from your Ubuntu application menu.
  2. In the left-hand sidebar, scroll down and click on Keyboard.
  3. Scroll to the very bottom of the Keyboard settings page and click on View and Customise Shortcuts.
  4. A new window will appear listing all default system shortcuts. Scroll to the very bottom of this list and click on Custom Shortcuts.
  5. Click the Add Shortcut button (or the + icon).

Configuring the Command

A small dialogue box will appear asking for three pieces of information:

  • Name: Give your shortcut a descriptive name (e.g., “Launch System Monitor”).
  • Command: This is the exact terminal command or application binary you want to run. For example, to launch the system monitor, you would type gnome-system-monitor. If you want to run a custom script, provide the absolute path (e.g., /home/user/scripts/backup.sh).
  • Shortcut: Click the button that says “Set Shortcut…”, then physically press the key combination you want to use (e.g., Ctrl + Alt + M).

Once you click Add, your new shortcut is instantly active. You can press your chosen key combination from anywhere in the OS to trigger your command instantly.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.

Receive our best articles and tips delivered straight to your inbox.