Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want my terminal to always start at a certain directory instead of home. How can I do this?

share|improve this question
add comment

3 Answers

up vote 8 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. –  Cawas Oct 5 '10 at 16:04
add comment

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
add comment

See this StackOverflow question.

share|improve this answer
add comment

Your Answer

 
discard

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.