Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set OS X Terminal's default home?

For some reason after I installed Boot Camp, my os x terminal started to point to the Boot Camp drive instead of my os x home directory by default! Once in the terminal I know how to switch back an forth and am able to do that, but I was wondering how to make my terminal default back to my os x home folder?

I've checked my Home Directory under System Preferences->Accounts->Control-click on my account and it is pointing to the right place. I've also tried unmounting it with no luck.

like image 379
Mac Avatar asked Sep 28 '08 06:09

Mac


2 Answers

This is a bit of under-the-hood fiddling, but you could simply enter

cd <directory>

in /Users/<yourUserName>/.profile

and startup a new terminal. You should then be in the directory you want.

like image 72
Thorsten79 Avatar answered Nov 20 '22 17:11

Thorsten79


You probably want these instructions for how to use the command line:

https://superuser.com/questions/154193/setting-a-users-home-directory-on-mac-os-x-server-from-the-command-line

Basically, use the dscl command line tool to see what the system thinks your home directory is set to, or to try and reset it....

like image 34
Kendall Helmstetter Gelner Avatar answered Nov 20 '22 15:11

Kendall Helmstetter Gelner