As specified in the comments of your question, you can write a simple text file, listing the packages to install:
iceweasel
terminator
vim
Assuming this is stored in packages.txt
, then run the following command:
xargs sudo apt-get -y install < packages.txt
xargs
is used to pass the package names from the packages.txt
file to the command line. From the xargs
manual:
xargs
reads
items
from the standard input, delimited by blanks (which can be protected
with double or single quotes or a backslash) or newlines, and executes
the command (default is /bin/echo
) one or more times with any initial
arguments followed by items read from standard input.
xargs
:xargs -P1 apt-get install < list-of-packages
.<
is shell redirection. For multiple files, use:cat file1 file2 .. | xargs -P1 apt-get install