I am referencing the following question because it's similar but not the same:
On my CentOS 7 system, I get a strange IP address from "hostname -i" after I change my hostname, and I am trying to figure out why this is the case.
I change the hostname with following command:
# hostnamectl set-hostname saturn
# systemctl restart systemd-hostnamed
My /etc/hosts file shows:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
The following is in my /etc/nsswistch.conf file:
hosts: files dns myhostname
My server IP address is 192.168.1.13, but "hostname -i" returns strange a IP address:
# hostname -i
92.242.140.21
However, "hostname -I" is fine:
# hostname -I
192.168.1.13
Why does hostname -i return 92.242.140.21. Is it a random dynamic IP assigned to my system by the DNS? Can someone explain? Thanks!
ping saturn
?