|
|
#1 |
|
All Star
Join Date: Sep 2002
Location: Omaha, NE
Posts: 794
|
Where is my .bashrc?
Okay, maybe I'm asking a stupid question.. but where is my .bashrc file? It is not in ~/, it's not in /bin or /usr or /usr/bin or /etc. Just wondering. Thanks.
__________________
I'm Microsoft Certified and I use a Mac... what does that tell you? Last edited by cameranerd74; 04-29-2005 at 06:33 PM. |
|
|
|
|
|
#2 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,939
|
If you haven't created it, it doesn't exist.
OS X does not supply default versions of the "dot" files for shells. You need to create it (with any plain text editor - e.g. 'pico') with the content that you want. And it must be at the top level of your home folder: ~/.bashrc But note also that bash doesn't read ~/.bashrc for "login shells" (which is what you get when you open a new Terminal window) - it reads ~/.profile This is all explained in the bash man page - under "startup files" or something like that. |
|
|
|
|
|
#3 |
|
Hall of Famer
Join Date: Sep 2003
Location: Old Europe
Posts: 4,969
|
If it's not in your home's root, you don't have one.
The only other sensible place to look for system-wide files of that kind would be in /etc where there wouldn't be a leading dot to such a file. locate somestrangefileyouthinkyouhave is pretty a pretty handy command for this kind of thing. |
|
|
|
|
|
#4 |
|
All Star
Join Date: Sep 2002
Location: Omaha, NE
Posts: 794
|
Thanks for the help guys. Maybe I should explain what I'm trying to do... I just want to put some aliases in my .bashrc, so I can have them when I log in. In linux, I just put them in the .bashrc (in ~/) and I'm all good. I tried putting them in .login, but nada. Where do you put aliases in Mac OS X?
__________________
I'm Microsoft Certified and I use a Mac... what does that tell you? Last edited by cameranerd74; 04-29-2005 at 06:34 PM. |
|
|
|
|
|
#5 |
|
All Star
Join Date: Sep 2002
Location: Omaha, NE
Posts: 794
|
Okay, nevermind. It works. I wrote the aliases I wanted in ~/.profile and it works. The problem before was, I had a saved shell, and apparently it wasn't reading the file. I created a new shell and viola. Thanks for your help guys.
__________________
I'm Microsoft Certified and I use a Mac... what does that tell you? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|