Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I just did a clean install of OS X Lion and I see that now I have no .bash_profile file in my home directory.

Should I create this by hand? (I want to save in it some alias.)

Thank you.

PS : The only file that exist now that I could use is /etc/profile

share|improve this question
add comment

1 Answer

up vote 15 down vote accepted

By default this file does not exist on any version of OS X. And yes, it is up to you to create it manually:

touch ~/.bash_profile

Alternatively, you could use nano as well if you want to edit the file at the same time:

nano ~/.bash_profile

Do not monkey in /etc unless you know what you're doing.

share|improve this answer
    
Thank you for your answer.I just created the file and it worked fine after opening a new terminal window –  skiabox Oct 7 '11 at 10:53
1  
You are welcome. If it solved your problem, please mark it as such to let others know if they ever reference this thread :) –  cksum Oct 7 '11 at 10:54
    
Thanks - this had been bugging me for a while –  iancrowther Jul 5 '12 at 22:30
    
Is there a reference in the OSX documentation for this? –  b.long Sep 25 '13 at 19:23
    
@b.long I haven't see one. Not that I scoured it, but Apple doesn't tend to publicize UNIX config files. They tend to focus on making their OSes as less scary as possible. But since OS X is fully UNIX 3.0 compliant, anything that works in Linux works here. You can simply google "bash_profile" or "bashrc" (here's a good primer on the difference between the two: joshstaiger.org/archives/2005/07/bash_profile_vs.html). –  cksum Sep 26 '13 at 3:06
show 1 more 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.