Saturday, May 4, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 23728  / 1 Year ago, sun, may 28, 2023, 12:23:53

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?


More From » installation

 Answers
1

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.


[#44181] Monday, May 29, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
memorrappin

Total Points: 325
Total Questions: 122
Total Answers: 100

Location: Armenia
Member since Sat, Sep 12, 2020
4 Years ago
;