Ubuntu – installing programs from the bash script

bashinstallationsoftware-center

I wish to install a large number of programs from the software center on all my 8 machines. Installing each program individually would be time consuming so I decided to write a bash script for installing all these programs in 1 go. It looks something like this –

#! /bin/sh
apt-get install xyz1
apt-get install xyz2
apt-get install xyz3

(Am running this script as a super user)

Now the problem is that for almost every installation it asks me ..need to get 123 kb of archives. Continue [Y/n] ? Every time I have to select Y(yes) myself.

Is there some way in which I can override this confirming mechanism so that I don't have to press y everytime?

Best Answer

First of all, you can use

sudo apt-get install pkg1 pkg2 ... pkg3

and next, with the option -y, apt-get will not ask for confirmation.

Related Question