0

I modified my /etc/hostname file and /etc/hosts like that:

hostname.com

and

127.0.0.1       localhost.localdomain localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

1.1.1.1 hostname.com

after that I run hostname hostname.com

now when I run hostname -f the result is:

hostname.com.com

Where did I go wrong?

0

I think you might need to put your unqualified domain name (hostname) in /etc/hostname and your fully qualified domain name (hostname.com) as the first entry after 127.0.0.1 in /etc/hosts. I'm not sure what the 1.1.1.1 ip address is but I think this line should be removed. This askbuntu question might help clarify, although I'm still not certain how you've got those results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.