Frequently open a specific folder in your PC? If so, assign the folder a keyboard shortcut can be more efficient. And here’s how to do the trick in Ubuntu, Fedora, Debian or other Linux with GNOME Desktop.
How Custom Keyboard Shortcut Work in Linux:
In Linux world, many jobs can be done via single commands, scripts, or system services. Instead of opening a command console or browsing through system utilities, user may assign custom keyboard shortcuts to make life easier.
And, in Ubuntu and other GNOME based Linux “Nautilus” is the default file browser. User may assign a keyboard shortcut to the command below to open a folder quickly:
nautilus /PATH/TO/FOLDER
For example, running nautilus /home/merilyn/Documents/work (or nautilus ~/Documents/work
) command will open the ‘work’ folder under Documents.
When running commands in terminal, we usually use “~” instead of typing /home/USER_NAME that refers to user home directory. However, when assigning custom keyboard shortcuts, it’s better to use full file path to avoid issues.
Make a keyboard shortcut to a Folder in Ubuntu, Debian, Fedora:
1.) Firstly, go to top-right corner system tray menu and click to open the system ‘Settings‘ (aka gnome-control-center).
2.) For Ubuntu 20.04 and Debian 11 with GNOME 3, go to ‘Keyboard Shortcuts‘ from the left pane and click ‘+‘ in the bottom right to start adding a custom keyboard shortcut.
For Ubuntu 21.10 and Fedora 35 with GNOME 40+, go to ‘Keyboard‘ from the left pane, then click ‘Customize Shortcuts’ in the right button.
3.) For GNOME 40+, user need to scroll down and click ‘Customize Shortcuts’ again in the next dialog:
4.) Next, you’ll see the button to add a new custom keyboard shortcuts. It’s either a green ‘Add shortcut‘ button or a ‘+‘ icon depends on whether you have had a custom shortcut.
5.) Finally, in the pop-up dialog, input:
- Name: type anything as you prefer.
- Command: nautilus /home/YOUR_USERNAME/Folder
- Click ‘Set Shortcut…’ and press a key combination (e.g., Ctrl + O) on next pop-up.
- And click on the green ‘Add’ button after all.
TIP: in file manager press Ctrl+L will show textual folder path. You may then press Ctrl+C or right-click to select copy to clipboard.
When everything’s done, press the key combination on keyboard to see effect and enjoy!
Recent Comments