From owner-freebsd-questions Tue Nov 18 18:05:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA15676 for questions-outgoing; Tue, 18 Nov 1997 18:05:05 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from python.shoal.net.au (perrya@python.shoal.net.au [203.26.44.5]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA15639 for ; Tue, 18 Nov 1997 18:04:51 -0800 (PST) (envelope-from perrya@python.shoal.net.au) Received: from localhost (perrya@localhost) by python.shoal.net.au (8.8.6/8.8.5) with SMTP id NAA26797; Wed, 19 Nov 1997 13:04:19 +1100 (EST) Date: Wed, 19 Nov 1997 13:04:19 +1100 (EST) From: Andrew To: "Jonathan E. Lyons" cc: questions@FreeBSD.ORG Subject: Re: Keeping mutliple machine and telnets straight.... In-Reply-To: <3.0.3.32.19971118190606.00756e98@midwest.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Hello, > Now that I have 3 FreeBSD machines on my network I've developed a nasty > habbit. I tend to telnet around from machine to machine and sometimes > (well, most of the time)lossing track of where I am. I've noticed on other > linux machines/shells the host name is in the command line...Ie... > > You have new mail. > # > > You have new mail. > hostname-# > > Is this just a different shell or what? depending on what shell you are using you can set this up in your prompt. I use tcsh and in my .cshrc i have: set prompt = "`whoami`@%m%B%c02%b%#%L>" which gives me andrew@joker~>> the whoami gives my username and the rest of the stuff (which I got off someone else, thanks Rob) gives your machine name, current directory ("~" for home dir), and some other stuff that I can't remember. There's a way of doing this under bash and zsh as well. I think under bash it goes something like PS1="`whoami`@`hostname`$"; export PS1 Bye the way, this will probably start some kind of shell war thread :-) Andrew Perry perrya@shoal.net.au~