182

In centos how do you answer yes automatically for yum install so that it is an unassisted install?

2 Answers 2

269

You can use:

yum -y install packagename

The "-y" implies "yes".

The long option is --assumeyes

4
  • 28
    Or, if you don't like memorizing the right way to get "yes" into every program, just use yes | yum .... Oct 25, 2012 at 5:23
  • 4
    @DavidSchwartz i had no idea what yes was for until just now. amazing! Feb 12, 2016 at 2:29
  • How to provide "No" ? Jun 24, 2021 at 6:48
  • 1
    @ChamindaBandara yes no Nov 1, 2021 at 15:17
13

Add the following line to /etc/yum.conf

assumeyes=1
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .