Hello everyone,
Today, I'll show you a simple way to automate the installation of multiple software packages on a newly installed Linux system — by using a text file and a shell script.
If you've just installed a Linux distribution, especially Fedora or Ubuntu-based, you might find it time-consuming to install all your essential tools one by one. Let's solve that with a batch installation script.
Step 1: Create a .txt
or .sh
File
Open any text editor and create a file named example.txt
(or better, example.sh
if you're writing a shell script).
Paste the following commands into the file:
⚠️ Note: The commands above are primarily for Fedora (
dnf
). If you're on Ubuntu or Debian-based systems, replacednf
withapt
.
Step 2: Save the File
Save the file as example.sh
(recommended since it's a shell script, not just plain text).
Step 3: Make the Script Executable
Now, open your terminal and run the following command to make the script executable:
This sets the file permissions so that:
-
You (the file owner) can read, write, and execute the script.
-
Others can only read it.
Step 4: Run the Script
Execute the script by running:
This will start installing all the listed software, one by one, automatically.
Final Notes
-
Make sure your internet connection is active.
-
You may need to enter your password when prompted by
sudo
. -
You can always add or remove software commands to suit your preferences.
Summary
Using a script file for software installation saves time and ensures consistency every time you set up a new system.
Let me know if you'd like a follow-up post on writing cross-platform install scripts for both Ubuntu and Fedora systems.
Thanks Sangram It Working
ReplyDeletethanks brother
Delete