set FQDN for hostname
Tom H
tomh0665 at gmail.com
Sat Nov 6 23:41:14 UTC 2010
On Sat, Nov 6, 2010 at 12:58 PM, Luis Paulo <luis.barbas at gmail.com> wrote:
> On Sat, Nov 6, 2010 at 10:29, Tom H <tomh0665 at gmail.com> wrote:
>>
>> Assuming
>>
>> cat /etc/network/interfaces
>> auto lo
>> iface lo inet loopback
>> auto eth0
>> iface eth0 inet dncp
>>
>> and
>>
>> cat /etc/hosts
>> 127.0.0.1 localhost.localdomain localhost
>> 127.0.1.1 thufir.hawat thufir
>>
>> If "/etc/hostname" is empty or non-existent, "hostname" and "hostname
>> --short" will return "localhost", "hostname --long" will return
>> "localhost.localdomain", and "hostname --domain" will return
>> "localdomain".
>>
>> If "cat /etc/hostname" returns "thufir", "hostname" and "hostname
>> --short" will return "thufir", "hostname --long" will return
>> "thufir.hawat", and "hostname --domain" will return "hawat".
>>
>> If "cat /etc/hostname" returns "thufir.hawat", "hostname" and
>> "hostname --long" will return "thufir.hawat", "hostname --short" will
>> return "thufir", and "hostname --domain" will return "hawat".
>
> ...
> The /etc/hostname should only contain the hostname (not the domain part)
>...
I mentioned both scenarios (short and long name in "/etc/hostname")
because this choice is just as divisive as vi/emacs, gnome/kde,
sendmail/postfix/exim, ... It is as much as a religious belief as it
is a canonical way of setting up a box.
More information about the ubuntu-users
mailing list