I figured it out. PS1 is set all over the place (sometimes I think Ubuntu is going "Microsoft" on us!). In order to get a common, unified PS1 for this system, I did the following:
1. set the promt I want in /etc/profile:
Code:
1 if [ "$PS1" ]; then
2 if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
3 # The file bash.bashrc already sets the default PS1.
4 # PS1='\h:\w\$ '
5 if [ -f /etc/bash.bashrc ]; then
6 . /etc/bash.bashrc
7 fi
8 fi
9 ## else
10 if [ "`id -u`" -eq 0 ]; then
11 # PS1='# '
12 PS1='$SHLVL \t \u@\h:\w\n# '
13 else
14 # PS1='$ '
15 PS1='$SHLVL \t \u@\h:\w\n$ '
16 fi
17 ## fi
18 fi
I added lines 12 and 15 (my desired prompts) and commented out 9, 11, 14 and 17.
/etc/bash.bashrc is sourced by /etc/profile (line 6), and it too wants to set PS1. I commented out the PS1 setting in this file, which is the 19th line in my version:
Code:
# set a fancy prompt (non-color, overwrite the one in /etc/profile)
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
Finally, $HOME/.bashrc also sets PS1. I commented out lines 59-73, except 64:
Code:
59 #if [ "$color_prompt" = yes ]; then
60 # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
61 #else
62 # PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
63 #fi
64 unset color_prompt force_color_prompt
65
66 # If this is an xterm set the title to user@host:dir
67 #case "$TERM" in
68 #xterm*|rxvt*)
69 # PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
70 # ;;
71 #*)
72 # ;;
73 #esac
I've also made this same change in /etc/skel/.bashrc so it propagates for newly added users.