Re: bash shell prompt
On Thu, 3 Sep 1998, Julian Gilbey wrote:
: > Hi,
: >
: > On Hamm, if I login as root or while logged in as myself do a "su"
: > then my shell prompt shows the host and current directory.
: >
: > When I am logged in as myself my prompt is just a $
: >
: > I much prefer to see the current directory in my prompt. So how do
: > I change it?
: >
: > 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\$ '
:
: You want to put this line in BOTH .bashrc (for non-login shells) and
: .bash_profile (for login shells). The manpage bash(1) explains which
: files are loaded when.
Or if you're truly lazy (like me), put the relevant lines in .bashrc and
source that file in .bash_profile ... that way you've got the same
environment whether you're in a login shell or not.
--
Nathan Norman
MidcoNet 410 South Phillips Avenue Sioux Falls, SD
mailto:finn@midco.net http://www.midco.net
finger finn@home.midco.net for PGP Key: (0xA33B86E9)
Reply to: