How to install a list of programs in a .txt file automatically through a terminal

9,794
xargs -rxa files_to_install.txt -- sudo apt-get install --

will work.

Share:
9,794

Related videos on Youtube

Peter_G
Author by

Peter_G

Updated on September 18, 2022

Comments

  • Peter_G
    Peter_G over 1 year

    I'm sure I've seen instructions on how do do this unfortunately it was a few months ago and have forgotten them.

    Thanks in advance to anyone who answers.

  • Knowledge Cube
    Knowledge Cube over 12 years
    @enzotib Out of curiosity, why is that better?
  • enzotib
    enzotib over 12 years
    @WarriorIng64: it is all done with bash, without using external process. It snould be a little bit more efficient
  • toesslab
    toesslab over 9 years
    Thx for your answer. on a ubuntu 14.04, I get the folloing error: Argument list too long. Any ideas, why?
  • David Foerster
    David Foerster over 5 years
    @toesslab.ch: Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks.
  • alhelal
    alhelal over 4 years
    This doesn't work when the file contains any program which is not recognized by the system. But better if skip this program and continue installation of other programs.