I have 20 or 30 deb files within a folder in a local directory, lets say /home/Downloads. Given that the amount of files may vary, I need a script(or command or whatever) which installs all these .deb when executed. I have no knowledge of scripting on Linux, so the most explicit the answers the better. Thanks in advance
Asked
Active
Viewed 383 times
1 Answers
1
I suggest using a for loop:
cd ~/Downloads
for i in *.deb; do echo installing "$i"; sudo dpkg -i "$i"; done;
for i in *.debloop into all "deb" filesecho installing "$i"print which one you are going to install- Using
dpkg -i packagewe install a "deb" package.
Hint: you can change dpkg -i with gdebi or apt install these options going to handle dependecies too (if any).
Ravexina
- 54,268
- 25
- 157
- 179
-
Really helpfull, this is what I was looking for. . Could not upvote the answer because of mi reputation. Anyway thanks. – Krlos9108 Jun 16 '17 at 12:54
-
I'm glad that it was helpful to you ;) – Ravexina Jun 16 '17 at 13:02