Best practice for command prompt mods

Peter Garrett peter.garrett at optusnet.com.au
Sat Jun 17 17:01:28 UTC 2006


On Fri, 16 Jun 2006 11:42:27 -0700
Tom Smith <tom71713-ubuntu at yahoo.com> wrote:

> What I ended up doing was changing this (the default)
> 
> PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
> 
> to this
> 
> PS1='${debian_chroot:+($debian_chroot)}\u@`hostname --fqdn`:\w\$ '
> 
> and it worked. (The file in which I made the changes is named 
> /etc/bash.bashrc.)

I noticed no-one had replied, so...

Obligatory disclaimer: I don't know what the "approved" method is :)

My impression: Your solution works, and I can't see how it would break
anything.

I suspect that on your next "dist-upgrade", debconf might ask you if you
want to leave /etc/bash.bashrc as you have it, or allow the upgrade to
overwrite it. In the latter case debconf helpfully puts a backup in place
for you with a file suffix like *.dpkg-old

I don't think playing with the command prompt will result in terrible
consequences :-)

Peter




More information about the ubuntu-users mailing list