
vi packages
# enter names of packages, hit return after each one
# :wq to quit editor
apt install `cat packages`
So "cat packages" is "copy-at-terminal", or just output the contents. The "ticks" around `cat packages` are actually "backticks", which mean evaluate the contained command .. so apt install followed by an evaluation of "cat packages" would equate to "apt install package1 package...