I find it very convenient to install packages on a new machine through package files like brewfiles, caskfiles, dockerfiles, package.json etc.
Is there an alternative to this for apt-get since I still just use it
through commandline with
apt-get install pkg1 pkg2 pkg3…
?
Best Answer
As specified in the comments of your question, you can write a simple text file, listing the packages to install:
Assuming this is stored in
packages.txt
, then run the following command:xargs
is used to pass the package names from thepackages.txt
file to the command line. From thexargs
manual: