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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content