On Thu, Mar 23, 2006 at 02:36:18PM +0100, Toby 'qubit' Cubitt wrote > I used to give the shell prompts different colours on different > machines to help avoid this. Or rather, the local one would always be > the same colour, but shells under ssh sessions were colour-coded by > machine. > > I've lost the script I wrote for this somewhere in the mists of time > (if I remember right, it was copied and hacked from a bash prompt > example that colour-coded according to the login type: ssh, telnet, > local, etc.) > > Someday I might get round to recreating it...
As a basic reminder of which machine I'm on, I set the following... export PS1='[\h][\u][\w]' On my main machine, an AMDK8 3000+, hostname is "m3000", so the prompt comes out as... [m3000][waltdnes][~] My old, emergency backup, semi-retired 1999 Dell PIII 450 mhz machine is named "m450", so its prompt comes out as... [m450][waltdnes][~] For a somewhat more colourful prompt, I now use... export PS1='[\[\033[01;32m\]\h\[\033[00m\]][\[\033[01;34m\]\u\[\033[00m\]][\[\033[01;36m\]\w\[\033[00m\]] ' -- Walter Dnes <[EMAIL PROTECTED]> In linux /sbin/init is Job #1 My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list