2

I want to have a one liner that installs all the packages I need, but I am unsure of how to include a groupinstall command in this (groupinstall 'Development Tools').

Right now I run this:

sudo yum install perl-CPAN wget zlib-devel tcp_wrappers

And then this:

sudo yum groupinstall 'Development Tools'

How can I make this a one liner?

1

I don't think you can get yum to do both at the same time, but if it must be one line:

sudo sh -c "yum install -y perl-CPAN wget zlib-devel tcp_wrappers ; yum groupinstall -y 'Development Tools'"

I added the -y to avoid the prompt for confirmation from yum.

5
sudo yum install perl-CPAN wget zlib-devel tcp_wrappers @'Development Tools'
  • 1
    Ok, you win, I didn't know that syntax to yum. :) – Steve Wills Oct 10 '15 at 22:29
  • You, sir, are an engineer. – Spencer Williams Nov 4 '15 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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