When I run installs in Fedora with say yum groupinstall "Development Tools"
, I am sometimes prompted to hit y/N.
Can I tell the OS to automatically choose "y" when such prompts occur? That would let me leave my computer for a while and come back.
When I run installs in Fedora with say yum groupinstall "Development Tools"
, I am sometimes prompted to hit y/N.
Can I tell the OS to automatically choose "y" when such prompts occur? That would let me leave my computer for a while and come back.
Try this:
$ sudo yum -y groupinstall "Development Tools"
From the yum
man page:
-y, --assumeyes
Assume yes; assume that the answer to any question which would be
asked is yes.
Configuration Option: assumeyes
NOTE: You could use yes
as well but it isn't really necessary. The yum
tool has a builtin switch for doing exactly this.
Yes, you can, with yes
. If you run it without arguments, it prints the letter y
indefinitely to stdout, and if you give it an argument, string or letter or anything, it will print that indefinitely to stdout.
In your case you would do it as follows:
yes | yum groupinstall "DevelopmentTools"
-bash: yes : command not found
How to prevent this error too ?
– Chaminda Bandara
Jun 24 '21 at 06:46
/usr/bin/yes
is a tool that constantly sends y\n
to stdout
. You can pipe that into any command that gives Y/N style prompts to force a "yes" answer to any such questions. You can also use yes
to send any other string you like by specifying it upon invocation, e. g. /usr/bin/yes foo
will send foo\n
to stdout
for as long as its output is being read.
-y
option that goes along withyum
that does that exact thing. Read the man page for more information on it. – Bratchley Jan 14 '14 at 20:41