Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a RHEL kickstart script, and in my %post, I need to install a JRE.

Basically, the current setup involves me needing to manually go in after first boot and set the newly installed JRE as the default using the alternatives --config command. Is there a way for me to pass arguments to alternatives so I don't have to manually pick the correct JRE?

share|improve this question
up vote 3 down vote accepted

Does your version have --set?

--set name path
Set the program path as alternative for name. This is equivalent to --config but is non-interactive and thus scriptable.

share|improve this answer
That's the ticket, thank you sir. – snk Mar 17 '10 at 15:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.