Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm able to change the terminal prefix with PS1="[\\W]$".

However, whenever I restart the terminal or open a new instance, it reverts to the default.

How can I make this change permanent?

Thanks!


Here's the content of ~/.profile file:

PS1="[\\W]\\$"
share|improve this question
    
try echo 'PS1="[\\W]$"' >> $HOME/.profile –  jm666 Jun 18 '13 at 19:41
    
Nope, that doesn't work. –  Ivanhoe123 Jun 18 '13 at 19:43
1  
@downvotes - what's wrong with the question? –  Ivanhoe123 Jun 18 '13 at 19:43
    
thats works. Simply you need add it into the .profile file. –  jm666 Jun 18 '13 at 19:43
    
Thanks for messages jm666 but it seems to be there already. I just updated the question with contents of my .profile file. –  Ivanhoe123 Jun 18 '13 at 19:46
show 2 more comments

1 Answer 1

up vote 4 down vote accepted

If both .bash_profile and .profile exist, bash reads only .bash_profile when opening a login shell. So try adding the line to .bash_profile instead.

share|improve this answer
    
That did the trick - thanks a lot Lauri! –  Ivanhoe123 Jun 19 '13 at 12:24
add comment

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.