How "hostname -i" works
Hi guys,
I want to know how the "hostname -i" works.
In one of my machine, when I have /etc/hosts mapping for the ip.
When I execute "hostname -i", I get IP address.
i.e rohith:~#hostname -i
10.10.10.11
But, when there is duplicate entry in the /etc/hosts mapping
Example :
10.10.10.11 rohith
10.10.10.11 rohith
I get result for "hostname -i" 2 ip addresses.
i.e rohith:~#hostname -i
10.10.10.11 10.10.10.11
Can someone please help me to resolve this problem?
Regards
Rohith Sharma K S
|