Install many applications using one command [duplicate]

Solution 1:

To build a list of installed packages use:

sudo dpkg --get-selections > package.list

To restore the packages use:

sudo dpkg --set-selections < package.list
sudo apt-get dselect-upgrade

Solution 2:

You can use sudo apt install app1 app2 app3 type command in order to install multiple applications from the terminal or a bash script. Simply list all of the applications you wish to install in that command.

For example, if I wanted to install the applications gufw, libreoffice and hexchat, I would simply run the command sudo apt install gufw libreoffice hexchat.

Make sure you use the correct package name for each one because if any one of the package names in the command are misspelled or incorrect, the entire command will fail.