DevOps session 13: Automate git SETUP using bash scripting.

Image
  Bash scripting: A Bash Shell Script is a plain text file containing a set of various commands that we usually type in the command line. It is used to automate repetitive tasks on Linux filesystem. It might include a set of commands, or a single command. For example ,to install GIT we need to update the packages, then install git and check if installation is done using Linux commands. We can write all the command in a .sh file and we can execute the file to do all the steps mentioned above. Lets start with example from hello-world. 1.Open terminal and check the root of the bash using below command. CMD: which bash you can see path like  /usr/bin/bash or /bin/bash . 2.Create a hello-world.sh file and paste the below lines. CMD: nano hello-world.sh You can see editor ,add below lines #!/bin/bash # declare MSG variable MSG="Hello World" # print variable on a screen echo $MSG To save the file use CTRL+X, then CTRL+Y and press ENTER 3. To execute the file we need to ad...

DevOps session 5: Linux setup on Windows 11

 


We can install Ubuntu on Windows 11 using Windows Subsystem for Linux (WSL).

Follow the below steps to setup Linux on windows 11.

STEP 1: Install WSL

Open Power shell as administrator. 


At the command prompt type:

wsl --install  and hit enter.

or 

wsl --install -d ubuntu

Wait until all packages are installed.

STEP 2: Download Ubuntu.

Go to Microsoft store and search for Ubuntu.


Click on Get button and Wait until Ubuntu is installed on your system.

You can verify by searching for Ubuntu. You can find the Ubuntu logo.

STEP 3: Configure Ubuntu.

Search for Ubuntu and open the terminal.

For the fisrt time you setup Ubuntu on windows ,it will ask to set username and password.

Provide any user name and password then hit enter.

Now terminal is ready is use.You can update the packages using below command.

sudo apt update

You can see all the packages will be updated.

💪💪💪 Happy coding 💪💪💪








Comments

Popular posts from this blog

DevOps session 10: Git basic commands for daily use

DevOps session 7: Source Code Management/ Version control systems (GIT) || Setup Git on ubuntu

DevOps session 11: Git branching & best practices