Search code examples
macosbashterminalprompt

How do I make changes to prompt in .bashrc file permanent on osx?


I'm a n00b trying to permanently change my terminal prompt.

I've used the following tutorials/threads:

http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html

http://www.linuxquestions.org/questions/programming-9/how-to-edit-bash_profile-and-bashrc-files-678445/

I've managed to change the .bashrc file:

$ cat .bashrc
export PS1="\w $"

but the prompt is still not coming up the way I want it.

On temporary basis the following works:

$ PS1="\w $"
~ $

Am I editing the wrong file?


Solution

  • Two suggestions:

    • After changing the .bashrc file, unlog and log again to see if it works.
    • Put it also in .profile, as .bashrc is only used if you have /bin/bash as your default shell.