Add Comment | Related Links | TrackBack
Related Content

.bashrc on Mac OS X

I am very fortunate to get remote access to Mac OS X. When I logged in, I got a nice greeting:

Welcome to Darwin!

But Darwin is really a version of OpenBSD, an UNIX varient. I love UNIX. You can pretty much do everything remotely as you can locally. If Apple had not gone with UNIX underneath its pretty GUI, I'd probably never get a chance to run on a Mac!

As soon as I logged in, I'm in Bash, one of my favorite UNIX shells. So, I'm all happy to reconfigure the environment so that the command-line would be friendlier to me. I copied over .bashrc and various login scripts from my existing Bash environments, logged out, and logged back in. But nothing happened. None of my familiar commands worked.

Strange. I loaded up "bash" again, but it works. Hmmmm. . . it only doesn't work when you first log in. Looks like the Apple engineers at Darwin made a change to its SSH/shell interface.

I found out later that Darwin looks for a ".profile" script file on log in, instead of the standard .bashrc. So I created this .profile file in my home directory with the following line:

source $HOME/.bashrc

This worked. It's also possible to copy the content of .bashrc to .profile. But when you run bash on its own, it won't look up .profile. So it's better to have .profile call .bashrc.

Chieh Cheng
Thu, 31 Aug 2006 20:19:19 -0700

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 2 + 1?
Click button only once, please!


TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Articles | Wiki
Forums | Latest | RSS
Library | Links | News
Search | Store | Help

94 Users Online

Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 2004 - 2023. All Rights Reserved.