Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 76389 - Default bash prompt is confusing
Default bash prompt is confusing
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: setup (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-10-21 04:34 EDT by Johan Walles
Modified: 2014-03-16 22:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-23 01:36:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Johan Walles 2002-10-21 04:34:11 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607

Description of problem:
The default bash prompt doesn't contain leading directories.  It only comes with
the name of the current directory.  I find this quite confusing.

I would like to have the default PS1 changed to include the whole path to the
current directory.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install (any?) Redhat.
2. Log in.
3. Change directory to /usr/local/bin.
4. Look at your prompt.

Actual Results:  The prompt says I'm in "bin", but not whether I am in /usr/bin,
/bin or /usr/local/bin.

Expected Results:  The prompt should say I'm in /usr/local/bin.

Additional info:

This has been a problem since way back.  I assume you are doing it on purpose
for some (unknown to me) reason.  I find it very annoying (YMMV).  Also, I know
I can change it for myself, but having had to change this for all Redhat
machines I get to since at least 5.something is starting to get to me.

Severity "normal" as this is a usability bug.  Change if you don't agree.
Comment 1 Yue Shi Lai 2003-11-07 13:33:30 EST
First of all, Red Hat uses this problem for like half of a decade, if
I remember correctly?

And maybe this is still a good approach, since the prompt is not meant
to be a replacement of /bin/pwd.

For example, if you are in
I at least would not think that a about 80 character wide prompt would
be of any help, since you have to type in your command on the second
line. Having to type "pwd" sometimes to figure out your exact working
directory seems to me to be small sacrifice, rather than to face 80+
character long prompts.

On some ksh based Unix systems (like HP/UX), you do have such a
behavior of having a full path in the prompt, which is quite annoying.

If you like the longer prompt, you can always redefine

PS1="[\u@\h \w]\$ "
export PS1

(lowercase w as compared to uppercase W) in .bashrc or .bash_profile.
Comment 2 Yue Shi Lai 2003-11-07 13:34:56 EST
Ups, sorry. Mistyped "prompt" as "problem" in the first line. ;-)
Comment 3 Bill Nottingham 2004-09-23 01:36:13 EDT
The default prompt isn't going to be changed at this point.

Note You need to log in before you can comment on or make changes to this bug.