On Sat, 30 Apr 2016 09:40:41 +0200, J.O. Aho wrote:
>
> Traditionally the host file included a row like:
>
> 127.0.0.1 desktop01 desktop01.localdomain localhost localhost.localdomain
I thought the format was ip_address FQDN alias [ ..] which suggests
your example would be
127.0.0.1 desktop01.localdomain localhost.localdomain desktop01 localhost
Of course that causes problems when you ask hostname for the
alias/short name :(
> Seems like Debian decided to have only one to one mapping in their host
> file and changed it to
>
> 127.0.0.1 localhost
> 127.0.1.1 dekstop01.localdomain dekstop01
Yep, that fixes problem about hostname -s returning more than one alias.
I usually just bump the last octet value.
127.0.0.1 localhost.localdomain localhost
127.0.0.2 mail.home.test mail
192.168.11.132 wb.home.test wb