FQDN confusion

Brian McKee brian.mckee at gmail.com
Fri Apr 24 13:57:32 UTC 2009

What is supposed to be in /etc/hostname?  The hostname? or the FQDN?
And what is usually placed in the /etc/hosts file after the
entry - FQDN or hostname?

What's started me on this was '\h' and '\H' in $PS1 were both just the hostname.
Further poking -  hostname and hostname --fqdn both return the same,
hostname -d returns null...

If I put the FQDN in the /etc/hosts file then hostname -f and hostname
-d work as expected,
but $PS1="\H" still just shows hostname...

Dazed and confused,


More information about the ubuntu-users mailing list