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