Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 2004 10:32:18 -0800
From:      "Robert Westendorp" <rjwsys@uniserve.com>
To:        "Steven N. Fettig" <freebsd@stevenfettig.com>, <questions@freebsd.org>
Subject:   Re: Hostname in shell (bash)?
Message-ID:  <03d101c3fd60$07dfefb0$d3a1f4cc@rob>
References:  <403F69E6.9050701@stevenfettig.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Try:

PS1=`id -un`@`hostname -s`"$ "

I put that into the .bashrc file.

----- Original Message ----- 
From: "Steven N. Fettig" <freebsd@stevenfettig.com>
To: <questions@freebsd.org>
Sent: Friday, February 27, 2004 8:01 AM
Subject: Hostname in shell (bash)?


> Hi all,
>
> I searched the archives and documents on bash, but I can't figure out
> how to put the hostname of the workstation I am on before the $ of the
> shell/command line.  Does anyone know how to add the hostname
> (preferably the first part - i.e. www, db1, etc) to the command line for
> bash 2.x?
>
> Thanks,
> Steve
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03d101c3fd60$07dfefb0$d3a1f4cc>