Super User is a question and answer site for computer enthusiasts and power users. 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 want my terminal to always start at a certain directory instead of home. How can I do this?

share|improve this question
up vote 9 down vote accepted

I'm not sure if theres a cleaner way, but adding cd path/to/directory in your .bash_profile in your home directory should automatically change your directory to what you specify.

share|improve this answer
    
As Randolph pointed out, there a cleaner way to change the home directory: stackoverflow.com/questions/145321/… difference of doing it so is that it also changes what ~ points to, as anything else pointing to "home" and not just the startup place. So, your answer is the most appropriate one for this question with this choice of words. – cregox Oct 5 '10 at 16:04

In Terminal.app's preferences, in the "Settings" tab, select the style of your terminal (probably Basic: the default), then go to the "Shell" pane and put cd /any/directory/you/want in the run command box. This will automatically change directory when you open a new terminal.

share|improve this answer

See this StackOverflow question.

share|improve this answer

Try this:

export HOME=DESTINATION_DIRECTORY

without any double quotation marks. To verify, type env and look out for HOME in the list.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .