[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \H in PS1 adds the hostname without the domain to the prompt
From: |
Greg Wooledge |
Subject: |
Re: \H in PS1 adds the hostname without the domain to the prompt |
Date: |
Wed, 12 Jun 2013 08:38:17 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, Jun 12, 2013 at 07:37:09AM +0200, Sascha Gaspar wrote:
> The \H in PS1 adds the hostname without the domain to the prompt.
> According to the man page \h outputs the hostname up to the first `.'
> and \H outputs the the hostname. I think that should be the FQDN?
Well, the manual says "the hostname".
> Repeat-By:
> # hostname
> myhostname
Since your system's hostname is set to the short form, that's what \H
gives you.
If you wanted \H to give the long form, then you would have to set your
system's hostname to the long form.