How can I change the startup directory of my Terminal on OS X?

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

2

4 Answers

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.

4

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.

1

See this StackOverflow question.

Try this:

export HOME=DESTINATION_DIRECTORY 

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

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like