Install apps on multiple computers simultaneously

mike_linux

Active Member
Joined
Nov 20, 2020
Messages
115
Reaction score
63
Credits
1,092
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
5,926
Reaction score
4,415
Credits
43,547
Or you can use a for bash loop.
Code:
for system in computer{1..13}
do
     ssh [email protected]$system "apt-get install firefox"
done
 
Last edited:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,926
Reaction score
4,415
Credits
43,547
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 [email protected]$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
115
Reaction score
63
Credits
1,092
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 [email protected]$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
5,926
Reaction score
4,415
Credits
43,547
Add an echo to it.
Code:
for system in computer1 computer2 computer3
do
     echo $system
     ssh [email protected]$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,516
Reaction score
1,245
Credits
11,069
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
115
Reaction score
63
Credits
1,092
@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 [email protected]$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?
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top