blfs book -suggested /etc/profile
jschrod at uni-muenster.de
Fri Jul 18 08:00:49 PDT 2003
Ken Moffat wrote:
> On Tue, 15 Jul 2003, Sam Barnett-Cormack wrote:
>>On Tue, 15 Jul 2003, Jan Van Belle wrote:
>>>Sam Barnett-Cormack wrote:
>>>>On Tue, 15 Jul 2003, Linux wrote:
>>>>I don't have that problem, but for me it doesn't correctly show
>>>>superuser shells (with a # instead of a $ at the end) - anyone know how
>>>>to fix this?
> Any joy on the '$ or #' part of this ? I've got my PS1 prompts set to
> include "\$" on my boxes, but last night I discovered that on my iBook
> root's prompt (when logging in directly) shows '#', but as a normal user
> the prompt stays at '$' even after su'ing to root.
> Is my bash broken ?
No, this is because you set $PS1 in /etc/profile, but /etc/profile is
only read when opening a new login shell, su does not open a login
shell, but just a normal interactive one, if you want bash to set your
new prompt, either use su - which starts a login shell, or set $PS1 in
~/.bashrc (you could also source /etc/profile in .bashrc)
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message
More information about the blfs-support