Where is Bash Prompt Set??
Hi, I'm new to debian, but not to linux. (experimenting with lenny...)
This is the question I asked myself while seeing various prompts after
I thought I had customised them. Near as I can tell, there are three
different scripts which fiddle with the default bash prompt:
/etc/profile
/etc/bashrc
~/.bashrc
I edited each one to replace the setting of PS1 with something like:
PS1="<name of file>:$PS1"
Now, logging in in different ways as different users:
Regular user on ttyn:
etc/profile:bash-3.2$
Root user on ttyn:
~/.bashrc:etc/profile:-bash-3.2#
{why does root's bashrc get sourced, but not user's?}
****************************************************************************
Regular user in emacs shell:
~/.bashrc(nocolor):etc/bashrc:bash-3.2$
Root in emacs shell:
~/.bashrc:etc/bashrc:~/.bashrc:etc/profile:bash-3.2#
{why is root's .bashrc read twice? Why no leading - on original
root prompt? Why does /etc/profile get sourced for root but not
for user?}
****************************************************************************
Regular user in xterm:
~/.bashrc(xterm):~/.bashrc(nocolor):etc/bashrc:bash-3.2$
Root in xterm:
~/.bashrc:etc/bashrc:~/.bashrc:etc/bashrc:bash-3.2#
{I guess no questions here, other than, again, why does root's
.bashrc get sourced two different times??}
If these aren't completely stupid questions, can anyone shed some
light?
TIA,
Scott Swanson
Reply to: