I’ve been diving into Ubuntu lately and trying to get the hang of Nautilus, but I’ve hit a little snag. You know how you can easily bookmark your favorite folders in Nautilus so you can access them quickly? Yeah, that part is super handy, but I’ve only been doing it through the GUI so far. What I’m curious about is whether there’s a way to add bookmarks to Nautilus directly from the terminal.
I’ve done some digging, but I’m not totally sure how to go about it. I mean, I know Linux is all about the command line, but I need a bit of guidance on this one. Do I need to edit some specific configuration file or can I simply use a command to do it?
Like, if I have a folder in my home directory that I want to bookmark—let’s say it’s something like `~/Documents/Projects/`—how exactly would I go about adding that as a bookmark through the terminal? Is there a particular syntax or command I should be using?
Also, I’ve seen some references to `~/.config/gtk-3.0/bookmarks` or something similar. Do I just append the new folder path there, or is there more to it? I’m a bit lost here, and the last thing I want to do is mess something up in my system.
If anyone has a step-by-step or even just some insights or tips, I’d really appreciate it! I know there’s a lot of great folks in this community who are always willing to help out, so I hope someone can shed some light on this. Thanks in advance for any advice you can share!
Adding Nautilus Bookmarks via Terminal
So, you want to add bookmarks in Nautilus using the terminal instead of the GUI? Cool, I got you! It’s actually pretty simple once you know where to look.
You were right about the bookmark file. Nautilus stores bookmarks in a file located at
~/.config/gtk-3.0/bookmarks
. You can easily edit this file to add your bookmarks manually from the terminal.Here’s how to do it step-by-step:
nano
orvim
) to open the bookmarks file. For example, you can type:yourusername
with your actual username.file:///path/to/folder/ BookmarkName
.nano
, you can pressCTRL + O
to save, thenCTRL + X
to exit).Some Tips:
And that’s it! You’ve added a bookmark through the terminal. Feel free to reach out if you have any more questions or run into issues!
To add bookmarks to Nautilus directly from the terminal, you can indeed modify the `~/.config/gtk-3.0/bookmarks` file where Nautilus stores its bookmarks. This process is straightforward. First, you would want to open this file in a text editor of your choice; for instance, you could use `nano` with the command:
nano ~/.config/gtk-3.0/bookmarks
. Once you have the file open, you can append your desired bookmark (e.g.,file:///home/yourusername/Documents/Projects/
) at the end of the file. It’s important to ensure the directory path is prefixed withfile://
so Nautilus understands it’s a directory path. Save the changes and exit the editor.If you’re looking for a more command-line-oriented approach without opening a text editor, you can add the bookmark by echoing the new entry directly into the file. Just use the command:
echo "file:///home/yourusername/Documents/Projects/" >> ~/.config/gtk-3.0/bookmarks
. Ensure to replaceyourusername
with your actual username. This method appends the bookmark directly, making it quick and efficient. After completing these steps, launch Nautilus, and you should see your newly added bookmark listed in the sidebar for easy access. This approach allows you to maintain your workflow in the terminal without any fuss.