What does a mac/linux developer’s ~/.bashrc file look like?

Well, here’s an example of mine.  Run ‘mate ~/.bashrc’ to view and edit the file, then save it and run ’source ~/.bash_profile’ (on Mac) or whatever your shell equivalent is.  Then, you can just use the aliases ‘bashrc’ and ’sourceb’ if you choose to set these aliases as I have.

# terminal colors
export PS1=’\033[32;1m\]mac:\[\033[1;32m\]\w
$\[\033[00m\] ‘
export TERM=xterm-color

# aliases
alias ls=’ls -G -a’
alias svna=’svn add . –force’
alias svnc=’svn commit -m’
alias svnd=’svn delete’
alias svne=’svn propset svn:executable’
alias svni=’svn propset svn:ignore’
alias svnr=’svn rename’
alias svns=’svn status’
alias bashrc=’mate ~/.bashrc’
alias sourceb=’source ~/.bash_profile’

# set environment paths
export PATH=~/source/rails
export PATH=$PATH:~/source/django

export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
export MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man

# add mysql location
export PATH=$PATH:/usr/local/mysql/bin

# add macports locations
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/var
export MANPATH=$MANPATH:/opt/local/share/man

# add jhbuild location
export PATH=$PATH:~/bin

# add pkgconfig location
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

# add gtk location
export PATH=/opt/gtk/bin:$PATH

# add ladspa location
export LADSPA_PATH=/usr/local/lib/ladspa

# add Flex SDK location
export FLEX_HOME=~/source/flex3sdk
export PATH=$PATH:$FLEX_HOME/bin

# add mxml generator location
export PATH=$PATH:~/mxml_location

# apache ant
export ANT_HOME=/usr/bin/ant
export JAVA_HOME=/usr/bin/java
export PATH=${PATH}:${ANT_HOME}/bin

Leave a Comment

You must be logged in to post a comment.