Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have made a some bookmarks in Nautilus, i.e. shortcut links to some directories.

I would like to cd to a directory which has been bookmarked in Nautilus. I was wondering if that is possible?

share|improve this question
Do you really want the bookmarks, or do you want mounted network locations? – jordanm Mar 8 '13 at 21:44
The bookmarks point to some directories on my local file system. THere is no network involved. – Tim Mar 8 '13 at 21:54

Nautilus saves its bookmarks in a file named .gtk-bookmarks in your home (from Ubuntu 13.04 on, it's located in .config/gtk-3.0/bookmarks). The bookmarks are stored in clear text, one bookmark per line. With a bit of shell scripting it should be possible to parse the file and configure your shell to allow something like: cd somebookmarkname.

share|improve this answer
add this to your shell's startup files (bash, zsh and similar): function cdbm { cd $(grep $1 ~/.gtk-bookmarks | awk '-F//' '{print $2}') } – SuperMagic Mar 8 '13 at 23:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.