No hostname and ip in /etc/hosts after RHEL 6 install

Solution Verified - Updated -

Issue

  • Anaconda on RHEL6 does not populate the public ip of the server and the hostname on /etc/hosts. This is documented here:

The /etc/hosts file is not populated with the hostname and IP in Red Hat Enterprise Linux 6

  • However, I don't understand if I'm ok to just add the entry manually there, like:
192.168.0.1 myhost myhost.mydomain.com
  • We don't use NetworkManager, just an old fashioned static ip config.

Environment

  • Red Hat Enterprise Linux (RHEL) 6
  • Static ip address

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.