Red Hat Customer Portal

Skip to main content

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

Solution Unverified - Updated -


  • 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 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