Install apps on multiple computers simultaneously

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
116
Reaction score
63
Credits
1,110
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
 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,400
Reaction score
4,854
Credits
47,036
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:
OP
mike_linux

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
116
Reaction score
63
Credits
1,110
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?.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,400
Reaction score
4,854
Credits
47,036
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.
 
OP
mike_linux

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
116
Reaction score
63
Credits
1,110
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?.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,400
Reaction score
4,854
Credits
47,036
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:

Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,531
Reaction score
1,260
Credits
11,192
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.
 
OP
mike_linux

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
116
Reaction score
63
Credits
1,110
@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