I recently installed CentOS 7 on a new hard drive with all default settings and when I enter:

# hostname

I get:


But "SVP" is neither in /etc/hostnames nor /etc/hosts configured.

But I have the default hostname localhost.localdomain.

SVP was the machine name of my old windows install but that hard drive wasn't even connected during my CentOS install and isn't connected now so my best guess is that the hostname SVP was saved on my NIC and written during my CentOS install. Can anyone confirm this?


I find it more likely that the name comes from the DNS. The machine gets the same IP address from DHCP (because the MAC address is still the same), and CentOS does a reverse lookup on the IP address and gets the old name back from the DNS server.

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.