Configuring bash on a Mac

The Mac OS does not create/copy a .bash_profile for you when your account is created. Follow these steps to setup a normal bash profile.

1. Create .bash_profile with the following contents:

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

2. Create .bashrc with the following contents:

export PS1="[\u@\h:\w]\$ "

export JAVA_HOME=/Library/Java/Home

3. Add any aliases to .bashrc

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s