Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Say I want to change the colors of my PS1, or for the sake of simplicity I just want to change the content, so I want to do this:

PS1="touch me : "

My problem, doubt is:

  1. If I put this in .bash_profile, every time I open a terminal I need to source it.
  2. If I put it in .profile, the same, I need to explicitly source it.
  3. It seems nasty to put this in .bashrc directly

Where should I locate this kind of configurations?

share|improve this question
    
What are you trying to accomplish ? why is it nasty to put your configuration in .bashrc ? .bashrc is probably best, but without knowing what your concerns are hard to give better advice. –  bodhi.zazen Feb 15 '13 at 17:47
    
I have read that bashrc should not be touched for this kind of configurations. Instead it should be put in another place. But I'm pretty ignorant with that. I am trying to put some color on PS1 and show the branch if I am in a directory that has a git repository. –  Hommer Smith Feb 15 '13 at 17:49

1 Answer 1

.bashrc is considered the proper place for such configurations.

For details see:

https://help.ubuntu.com/community/CustomizingBashPrompt

If you have concerns or someting to the contrary you read somewhere, you would need to express them or post a link for better advice.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.