Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Why is PS1 (the console prompt) different for the root user?
Date: Sat, 10 Jun 2017 06:12:20
Message-Id: ohg2jb$k3d$1@blaine.gmane.org
1 I noticed that the root prompt does not include the full path of the
2 current directory. Normal user:
3
4 me@gentoopc ~ $ cd /usr/bin
5 me@gentoopc /usr/bin $
6
7 However, for root:
8
9 gentoopc ~ # cd /usr/bin
10 gentoopc bin #
11
12 So for users, I can see where I am ("/usr/bin"). For root, I cannot. It
13 just says "bin".
14
15 Now, I can change it easily in /etc/bash/bashrc (not sure if that's the
16 correct place, but it works) by replacing "\W" with "\w". However, I'm
17 curious as to why "\W" is used for root. When I have several root logins
18 open (and I usually have to,) it makes it difficult to tell where I am.
19 It says "bin", but am I in /usr/bin, /usr/local/bin, somewhere else?
20
21 Is there a rationale for this?

Replies