0

Why am I unable to set new command prompt for terminal in OS X Mavericks?

I've tried to do the following:

export PS1="\u \W$ "

It works as expected but after restart the default value of PS1 will be used again. Why? What am I doing wrong? How can I fix it?

And yes, I don't have ~/.bashrc file.

2

Put it in your ~/.profile file.

6
  • It works, but why am I unable to manually set it? Jul 10 '14 at 9:53
  • 1
    You can set it manually, but it only persists for the current session, so you need to set it at the start of each session in your profile. Jul 10 '14 at 9:54
  • I think that export do this Jul 10 '14 at 10:00
  • 4
    export makes it available to processes started from the current one, not new ones started from elsewhere. Jul 10 '14 at 10:03
  • Did this answer your question? If so, please consider accepting it as the answer. If not, please say what didn't work so that I, and others, can assist you further. Thank you. Jul 11 '14 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .