Skip to navigation

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

Issue

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

    # more /etc/hosts
    127.0.0.1   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.
    127.0.0.1        localhost.localdomain localhost
    ::1              localhost6.localdomain6 localhost6
    10.211.50.34        vm.it.domain.com vm-it-domain
    

Environment

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