0

I have a pretty extensive .bash_profile set up on my older machine using Lion and I would like to include a lot of the same functionality. I noticed that Mavericks doesn't have a .bash_profile by default.

What is the best practice here?

.bashrc
.bash_profile
.profile

Should I just create the file, should it be picked up automatically or is there anything else to configure?

Note: This is just for a single user account, so it doesn't have to be set up globally.

1 Answer 1

1

Go right ahead and put your old .bash_profile file in your home directory and it will get read.

For your purposes .bash_profile, .bash_login and .profile are identical with the exception that one and only one will be read - the first one found of the three with bash searching in that order.

.bashrc is only read when you run an interactive shell that is not a login shell.

2
  • Terminal.app by default runs a login shell
    – mmmmmm
    Feb 21, 2014 at 0:52
  • Some more info; on a typical system, .profile contains common settings that will be needed regardless of what type of login it is. .bash_profile and .bashrc then both include it and also set their own settings for either a login or interactive shell.
    – miken32
    Feb 21, 2014 at 5:19

You must log in to answer this question.

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