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

Updated 2011-12-07T02:48:48+00:00


  • The /etc/hosts file is missing the hostname :

    # more /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
  • On Red Hat Enterprise Linux 5 the /etc/hosts file is :

    $ more /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.        localhost.localdomain localhost
    ::1              localhost6.localdomain6 localhost6 vm-it-domain


  • Red Hat Enterprise Linux 6.1 or later

  • Red Hat Enterprise Linux 6.0 (*1)

Subscriber content preview. For full access to the Red Hat Knowledgebase, please log in.

Not a subscriber? Learn more about the benefits of Red Hat Subscriptions.