Re: bash shell prompt
On Thu, 3 Sep 1998, M.C. Vernon wrote:
>
> > My guess was that the .bashrc in my home directory needed the
> > same PS1 environment as the .bashrc in the root directory so I
> > added
> >
> > export PS1='\h:\w\$ '
> >
> > but this does not solve the problem UNLESS I login as myself and
> > then type
> >
> > bash
> >
> > at which point the prompt changes.
> >
> > So I seem to have the right environment variable but do I need to
> > put it in a different file or what?
>
> You need to put it in .bash_profile
>
> (RTFM for explaination - it's too complex to condense here, but basically,
> it looks for .bash_profile first)
.bashrc only gets read for subshells. .bash_profile always get read no
matter what. You can also source .bashrc from .bash_profile and you can
forget about order. -marlon
Reply to: