I have following entry in /etc/hosts
127.0.0.1 localhost
127.0.1.1 myusername
I needed to find out my domain name so that i could correct the above format of the entry and enable smtp to send mails. I needed something like this (as per googling):
127.0.0.1 localhost localhost.localdomain myusername
But I cannot determine my domain name. I tried following commands but nothing gave me the answer.
$hostname -d
returned empty string
$nslookup 127.0.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53
1.0.0.127.in-addr.arpa name = localhost.
$domainname
(none)
$nslookup 127.0.1.1
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find 1.1.0.127.in-addr.arpa.: NXDOMAIN
Please Help. I am a newbie so sorry if there is some mistake.
Bookmarks