Member-only story

Re-Setup Your New Linux Or Mac System Just Like the Old One With a Single Command

Ganesh Prasad
3 min readJan 13, 2023

--

Suppose you had a system with lots of software installed and many settings through the terminal (like Environment variables, .profile, .bashrc files, etc.). And, for some reason, you need to have the same environment in a new laptop or PC. In this article, we will see how you can create a single executable file for the same.

The executable file for the Linux

Every Linux terminal has bash, so you can create a file that uses bash to execute and ends with a “.sh” extension. Of course, there are other alternatives for bash, but let’s stick with it for now.

touch setup.sh

This will create the setup.sh file.

Now, let’s assume a scenario where you have to install the following programs:

  1. Python3
  2. chromium-browser
  3. vim

There can be some complicated settings like you have a .bashrc file saved somewhere, and you want to download it and place it in your home directory, which might look something like this.

wget "the/url/to/your/file"
mv fileYouJustDownloaded ~/

Then your setup.sh file will look like the following

--

--

Ganesh Prasad
Ganesh Prasad

Written by Ganesh Prasad

Backend Developer at Appscrip | C++ veteran, 💜 Dart

No responses yet