Customize Mac OSX Terminal prompt
November 7, 2009 § Leave a comment
Mac OSX may contain multiple profiles for Terminal
If you are using bash on your terminal, I would suggest not to use .profile and re-direct .bashprofile to .bashrc. Keep .bashrc as your only bash profile to streamline your terminal setup.
To resolve the profile on terminal consider doing this using nano as editor on your OSX Terminal.
To open ~/.bash_profile in nano
$ nano ~/.bash_profile
Enter the following. Save the file by Ctl+o and exit nano by Ctl+x
Save all the settings in .bashrc to avoid duplication
Customize the terminal promot. Enter the following in .bashrc using nano
export PS1=”\u$ ”
This will show username with $ as terminal prompt