Twitter Updates

Sunday 14 September 2008

Setting up the terminal

This was something I discovered a long time ago and could not find an earlier entry about it.
Certain Mac OS X terminal programs read the properties from the ~/.bash_profile and some fom the ~/.bashrc.

NB: ~ means the users home directory. and files beginning with a dot '.' are hidden files in unix speak. Something rc often refers to configuration files for the something program.

A good soloution to the problem is to make .bash_profile load your .bashrc, like so

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


A very basic .bashrc file would look something like

#.bashrc file for users terminal /command line preferences
# This is a comment. MAC-UK keyboards type alt-3 for a # character

#Add a shared scripts folder to the Path
export PATH=$PATH:/Users/Shared/Scripts/


#make ls look pretty with colours (list your files)
alias ll='ls -l -FG'
alias ls='ls -AFG'

No comments: