Install apps on multiple computers simultaneously

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
137
Reaction score
67
Credits
1,287
Hi guys, I have 13 pc's at work which are running Lubuntu 14.04. LTS. Because I don't want to install from my pc (which is the 14th one) separately each software one by one pc (this is a tedious task), I would like to know if there is any application available which helps me to do this simultaneously. For example, Installing Google chrome on all pc's simultaneously. All pc's are connected to the same network via a 3Com Switch. THX for recommendations.suggestions
 


This is a perfect job for ansible.
 
Or you can use a for bash loop.
Code:
for system in computer{1..13}
do
     ssh root@$system "apt-get install firefox"
done
 
Last edited:
Or you can use a for bash loop.
Code:
for system in computer{1..13}
do
     ssh root@$system "apt-get install firefox"
done
@f33dm3bits This sounds good, So, if I understood you right, I create a bash file insert the above and execute the script? Is that right. Do I need also to paste everywhere the 13 IP addresses to get access?.
 
Just replace computer{1..13} with the dns names of the systems, if you have different names that would look like this.
Code:
for system in computer1 computer2 computer3 
do
     ssh root@$system "apt-get install firefox"
done
You will have to enter the root password if you don't have sshkeys setup for authentication.
 
Just replace computer{1..13} with the dns names of the systems, if you have different names that would look like this.
Code:
for system in computer1 computer2 computer3
do
     ssh root@$system "apt-get install firefox"
done
You will have to enter the root password if you don't have sshkeys setup for authentication.
@f33dm3bits THX, this is similar to Python :). Is there any possibility to debug the execution of the loop to see which pc's are on the current state?.
 
Add an echo to it.
Code:
for system in computer1 computer2 computer3
do
     echo $system
     ssh root@$system "apt-get install firefox"
     echo *****************
done
Or you could just do it in python since you seem to be more familiar with that. :)
 
Last edited:
I would like to know if there is any application available which helps me to do this simultaneously.
I haven't used this since I haven't had the need to, so I can't confirm whether it works or how it does, but there's this https://fai-project.org/
FAI is a tool for unattended mass deployment of Linux. It's a system to install and configure Linux systems and software packages on computers as well as virtual machines, from small labs to large-scale infrastructures like clusters and virtual environments. You can take one or more virgin PC's, turn on the power, and after a few minutes, the systems are installed, and completely configured to your exact needs, without any interaction necessary.
 
@f33dm3bits THX I will try this on Monday at work. Hope this will help me to install all the apps at once :).

Add an echo to it.
Code:
for system in computer1 computer2 computer3
do
     echo $system
     ssh root@$system "apt-get install firefox"
     echo *****************
done
Or you could just do it in python since you seem to be more familiar with that. :)
Do you have to import any specific library for that?
 

Members online


Top