How do I add a folder to the sidebar in Ubuntu?

How do I add a folder to the sidebar in Ubuntu?
In Windows, you can handily add your favorite folders to the sidebar with a simple drag and drop maneuver. At first glance, this may seem impossible to achieve in Ubuntu, as trying to drag a folder to the sidebar for easy accessibility does not work. However, there is a way you can do that, and this guide is devoted to showing you how.

Getting Started

Before we get into the technicalities of the matter, you should have a folder in mind that you would like to pin to your sidebar. We will provide you a code that you can put into a newly created text file and modify according to your needs. This code will bridge the gap between your folder and a shortcut to it in the sidebar.

As we mentioned earlier, drag and drop do not work. So, we are forced to take a different approach. Once you have the folder you want to add to the sidebar, leave it as it is and open a new Terminal window. We will come back to the folder later, but for now, hit Ctrl + Alt + T on your keyboard to start the process.

Creating a shortcut

Once you have opened the command line, please type in the following command and run it to create a new file on the desktop that will serve as the shortcut to your desired folder. For this guide, we will attempt to add my Important folder to the sidebar.

$ touch ~/.touch/share/applications/important.desktop

Once this file is created, you can open it in a text editor and add the code we talked about earlier. Run the command below to do so.

$ gedit ~/.touch/share/applications/important.desktop

You should see a new text editor window pop up on your screen. This is where the magic happens. We will give you a general understanding of how one can add their folder to the sidebar, but if you want to make the code custom to your specific needs, you will need to tweak the code a bit. We will try to equip you with all the information you need, though.

Without any further ado, we will copy-paste the following lines of code into the text editor and save it.

[Desktop Entry]
Comment=Access and organize files
Exec=nautilus --new-window %U
[Desktop Action new-window]
Name=New Window
Exec=nautilus --new-window
[Desktop Action open-Important]
Name=Open my Important folder
Exec=nautilus /home/ubuntu/Desktop/important

It is high time that we tell you which modifications you need to make to this text to supplement your needs. First, in the Name entry, you need to enter the name of whichever folder you would like to create a shortcut. Similarly, in the 10th line of code, change the Action from open-Important to open-[Your folder's name] without the parentheses.

Change [Desktop Action open-Important] according to your folder name; the same goes for Name=Open my Important folder. Lastly, you will need to replace the 17th line of code with the address to your folder. Note that my username is ubuntu so that you can replace it with yours. If you do not know your username, run the following command in the terminal to find out.

$ whoami

With that done, you are well on your way to add your favorite folders to the sidebar. If you would like to explore further what actions you can perform and how you can modify the text file further, go to this link. What follows now is quite simple. Click the Activities button on the top-left of your screen and type the name of your folder in the search box. Right-click the application and select Add to Favorites.

Having done that, you should now see a new addition to the folders and applications on the sidebar. Right-click it, and you should see an option that lets you access the folder you want.

And there you go! You have successfully added your desired folder to the sidebar in Ubuntu.

Creating a bookmark

It is often the case that Ubuntu users would want to create a bookmark in their File Manager directory that lets them navigate to their important folders quickly. Creating a bookmark is in the same vein as adding a folder to the sidebar, so we figured it fit for discussion.

This one is quite easy; however, there are many ways to do this same thing. Since you could be running a different version of Ubuntu, we will describe the most inclusive methods that work for most versions and Linux distros.

On Ubuntu 20.04 LTS, the version we're running, adding a bookmark is a breeze. Simply navigate to the folders you would like to add as bookmarks, hold left-click on them and drag them to the bookmark area. The UI will let you know when it is safe to drop the folder(s) by displaying an option that says New Bookmark. With that simple technique, you can add all the bookmarks you want! Alternatively, press Ctrl + D on your keyboard and instantly bookmark the location you have currently opened.

On Ubuntu 13.04, there is a cogwheel button on the top-right corner of the File Manager, right next to the Close, Maximize, and Minimize buttons. You can click it to expand a drop-down menu and select the Bookmark this Location option.

If you are running Ubuntu 12.04 Precise and with Nautilus 3.4x, follow the menu, click Bookmarks and select Add Bookmark. You can also press Ctrl + B to open the Edit Bookmarks window and figure out your way from there.

On Ubuntu 16.04 with Unity, the bookmark settings are placed differently. Open a file manager window, and at the top of the window, you can access the global menu. There will be a button for Bookmarks that you can use to bookmark the current location.

Lastly, you can remove the bookmarks by right-clicking them and selecting the Remove option. This may be trivial for most readers, but absolute Linux beginners can definitely benefit from it.


This article discussed how you could add a folder to the sidebar in Ubuntu and then followed it by showing you how you can add a bookmark to the Nautilus shell in Ubuntu. Admittedly, these are relatively tame and trivial tasks, as we mentioned earlier. However, they ought to help out a Linux beginner in distress. Hopefully, this was an informative and enjoyable guide on your end.

Asenna uusin OpenRA-strategiapeli Ubuntu Linuxiin
OpenRA on ilmainen / ilmainen reaaliaikainen strategiapelimoottori, joka luo uudet Westwood-pelit, kuten klassinen Command & Conquer: Red Alert. Hajau...
Asenna uusin Dolphin Emulator for Gamecube & Wii Linuxiin
Dolphin-emulaattorin avulla voit pelata valitsemiasi Gamecube & Wii -pelejä Linux-henkilökohtaisilla tietokoneilla (PC). Koska Dolphin Emulator on va...
Kuinka käyttää GameConqueror-huijausmoottoria Linuxissa
Artikkelissa on opas GameConqueror-huijausmoottorin käytöstä Linuxissa. Monet Windows-pelejä pelaavat käyttäjät käyttävät "Cheat Engine" -sovellusta m...