Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 04-29-2005, 12:11 PM   #1
cameranerd74
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.
cameranerd74 is offline   Reply With Quote
Old 04-29-2005, 12:32 PM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,409
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.
hayne is offline   Reply With Quote
Old 04-29-2005, 12:34 PM   #3
voldenuit
League Commissioner
 
Join Date: Sep 2003
Location: Old Europe
Posts: 5,141
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.
voldenuit is offline   Reply With Quote
Old 04-29-2005, 06:00 PM   #4
cameranerd74
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.
cameranerd74 is offline   Reply With Quote
Old 04-29-2005, 07:56 PM   #5
cameranerd74
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?
cameranerd74 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 07:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.