Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 17 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
You are welcome. If it solved your problem, please mark it as such to let others know if they ever reference this thread :) – user10355 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? – blong 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: – user10355 Sep 26 '13 at 3:06

Your Answer


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.