Thursday, October 20, 2011

Customize Terminal for Mac OS X Snow Leopard

Wanted to permanently change the default prompt used in the Mac Terminal as well as add other customizations to Terminal behaviour. Found mixed recommendations on the web for how to do this, but none of which worked for me on a MBP with OS X 10.6. In the end I just guessed at a few things at eventually did the following:

- Edit the file /etc/bashrc (that's right, not '.bashrc' but simply 'bashrc').
- Append the desired value for $PS1, which overrides the definition already present in the file.

For example, to customize my prompt and have all 'ls' commands become 'ls -al' I appended the following:

PS1='\u: \w\$ '
alias "ls"="ls -al"

No comments:

Post a Comment