On Tue, Jan 28, 2014 at 04:06:19PM +0000, James wrote
> Walter Dnes <waltdnes <at> waltdnes.org> writes:
> 
> >   In your bash profile (if you use bash), howsabout
> > export PS1='[\h][\u][\w]'
> 
> >   Actually, I go for a fancy "technicolour prompt"
> > export
> >
> > PS1='[\[\033[01;32m\]\h\[\033[00m\]][\[\033[01;34m\]\u\
> > [\033[00m\]][\[\033[01;36m\]\w\[\033[00m\]]'
> >   Either way, the host name shows up at the beginning of the prompt.
> 
> I like to see the IP addresses of the systems I've sshd into. I work on a
> myriad of embedded and small systems, so IP addresses works best for me.

  In that case, try something like

export 
PS1='[\[\033[01;32m\]192.168.0.1\033[00m\]][\[\033[01;34m\]\u\[\033[00m\]][\[\033[01;36m\]\w\[\033[00m\]]'

  If you have to determine it after logging in, you can export an
environment variable to PS1, e.g.

export PS1="[\$FOO]$ "

***NOTE THE LEADING BACKSLASH*** See
http://stackoverflow.com/questions/7359652/how-to-insert-an-environment-variable-inside-the-bash-prompt

-- 
Walter Dnes <waltd...@waltdnes.org>
I don't run "desktop environments"; I run useful applications

Reply via email to