Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

In gnome-terminal if I choose File->"Open Terminal" or "Open Tab" I get a new window in the same directory as the current window. I would like to create a gnome-terminal profile that starts in a particular directory. I have experimented with the "run a custom command" option in the "Title and Command" section of the profile's properties, but so far all my attempts result in the terminal immediately exiting. Is there a way to do this?

share|improve this question
up vote 5 down vote accepted

I did some testing, and the following worked for me as a custom command:

sh -c "cd /path/to/dir; exec bash"
share|improve this answer
Awesome! Thanks! – Paul Lynch Aug 28 '12 at 15:51

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.