1

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

1 Answers1

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 *.deb loop into all "deb" files
  • echo installing "$i" print which one you are going to install
  • Using dpkg -i package we 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
  • 55,668
  • 25
  • 164
  • 183