How to set the hostname of a system from the Anaconda command line during kickstart installation of Red Hat Enterprise Linux?

Solution Verified - Updated -

Issue

  • How to set hostname of a machine through anaconda command line during kickstart installation of Red Hat Enterprise Linux?
  • The machines registering to Satellite after kickstart are getting registered using localhost.localdomain hostname, whereas the %post script to set the hostname is already there.
  • How to make sure that the %post script running to set hostname runs before the system registers to Satellite?

Environment

  • Red Hat Satellite
  • Red Hat Enterprise Linux

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.