How to add global alias and global variable on Mac OS X?
1. Edit or create file ~/.bash_profile.
2. To add new alias 'll' in ~/.bash_profile with bellowing line:
alias ll="ls -laG | less"
3. To add global variable:
export u="/Applications/Utilities/"
Save the file and open a new terminal window, those alias and variables are useable in new window.
E.g.
user$ cd $u
user$ ll