How to Start and Stop AWS EC2 instance in AWS account using Shell script

Do you turn off off your lights when you leave your home or room ? Yes of course similarly when you don’t require any instance for sometime , its always a good practices to stop them and only start when required.

AWS EC2 is one of the most important and widely used service of Amazon where we launch instances. Many AWS accounts have almost multiple instance that are ideal and and requires some kind of automation to bring them either to stop state and when required power them on right away. Shell script works very well in automation world and for these activities . So Lets get started.

In this tutorial we will go through Shell script that takes few seconds to power on that is start or stop the instance.

Table of Content

  1. What is Shell script ?
  2. What is AWS EC2 instance?
  3. Prerequisites
  4. Install AWS CLI Version 2 on windows machine
  5. How to Start and Stop AWS EC2 instance in Amazon account using shell script
  6. Conclusion

What is Shell Scripting or Bash Scripting?

Shell Script is simply a text of file with various or lists of commands that are executed even on terminal or shell one by one. But in order to make thing little easier and run together as a group and in quick time we write them in single file and run it.

Main tasks which are performed by shell scripts are : file manipulation , printing text , program execution. We can include various environmental variables in script that can be used at multiple places , run programs and perform various activities are known as wrapper scripts.

A good shell script will have comments, preceded by a pound sign or hash mark, #, describing the steps. Also we can include conditions or pipe some commands to make more creative scripts.

When we execute a shell script, or function, a command interpreter goes through the ASCII text line-by-line, loop-by-loop, test-by-test, and executes each statement as each line is reached from the top to the bottom.

What is AWS EC2 instance?

AWS EC2 stands for Amazon web service elastic compute cloud. AWS EC2 is just like a virtual server that is highly scalable in nature. The best part of EC2 instance is that, you don’t need to invest in any sort of hardware and it hardly takes few seconds to few minutes to launch. Once this is launched in few mins you are ready to deploy your applications. You can launch as many ec2 instance you wish to launch.

  • AWS EC2 service provides you Preconfigured templates known as AMI ( Amazon machine Image ) that includes operating system and software configurations that are highly required. Using these preconfigured templates you can launch your EC2 instances.
  • You can use Preconfigured templates and on the top of these templates you can configure your own software’s and data you wish to have when an instance is launched.
  • AWS EC2 service provides you various types of instance types with different CPU and Memory configurations. For Example: t2.micro, t2.medium etc.
  • AWS EC2 service provides login to these launched instances with completed security such as by creating a Key pair ( One of the key is public which remains with AWS and private is given the owner of instance)
  • AWS EC2 service allows you to add two kinds of storage . First storage is known as instance store volumes which are temporary storage and the other storage is EBS which is Elastic block storage & these are permanent storage.
  • Once AWS EC2 instance is launched you are the owner of the instance.
  • AWS EC2 is launched with root device volume that boots your system. You can have root device volumes as instance store based or as EBS based.
  • AWS EC2 service provides various states of a launched instance such as STOPPED , RUNNING , TERMINATED.
    • Note: Once instance is terminated it cannot be restarted back.

Prerequisites

  1. AWS account to create ec2 instance. If you don’t have AWS account please create from AWS account or AWS Account
  2. Windows 7 or plus edition where you will execute the shell script.
  3. Python must be installed on windows machine which will be required by AWS cli. If you want to install python on windows machine follow here
  4. You must have Git bash already installed on your windows machine. If you don’t have install from here
  5. Code editor for writing the shell script on windows machine. I would recommend to use visual studio code on windows machine. If you wish to install visual studio on windows machine please find steps here

In this demo , we will use shell script to launch AWS IAM user. So In order to use shell scripts from your local machine that is windows you will require AWS CLI installed and configured. So First lets install AWS CLI and then configure it.

Install AWS CLI Version 2 on windows machine

  • Download the installed for AWS CLI on windows machine from here
  • Select I accept the terms and then click next button
  • Do custom setup like location of installation and then click next button
  • Now you are ready to install the AWS CLI 2
  • Click finish and now verify the AWS cli
  • Verify the AWS version by going to command prompt and type
aws --version

Now AWS cli version 2 is successfully installed on windows machine, now its time to configure AWS credentials so that our shell script connects AWS account and execute commands.

  • Configure AWS Credentials by running the command on command prompt
aws configure
  • Enter the details such as AWS Access key , ID , region . You can skip the output format as default.
  • Check the location on your system C:\Users\YOUR_USER\.aws file to confirm the the AWS credentials
  • Now, you’re AWS credentials are configured successfully.

How to Start and Stop AWS EC2 instance in Amazon account using shell script

Now we have configured AWS cli on windows machine , its time to create our shell script to stop and start ec2 instance.

This is a demo tutorial so we will show only one instance that will start if instance state is stopped and will stop it if its in running state.

  • Create a folder on your desktop and under that create file start-stop-ec2.sh
# /usr/bin/bash 

set -e  # set -e stops the execution of a script if a command or pipeline has an error

id=$1   # Provide the instance ID with the name of the script

# Checking if Instance ID provided is correct 

function check_ec2_instance_id () {
    
    if echo "$1" | grep -E '^i-[a-zA-Z0-9]{8,}' > /dev/null; then 
           echo "Correct Instance ID provided , thank you"
           return 0
    else 
          echo "Opps !! Incorrect Instance ID provided !!"
          return 1
    fi
}

# Function to Start the instance 

function ec2_start_instance ()   {
     aws ec2 start-instances --instance-ids $1 
}

# Function to Stop the instance 

function ec2_stop_instance ()   {
     aws ec2 stop-instances --instance-ids $1 
}

# Function to Check the Status of the instance

function ec2_check_status ()   {
     aws ec2 describe-instances --instance-ids $1 --query "Reservations[].Instances[].State.Name" --output text
}


# Main Function 

function main ()  {
     check_ec2_instance_id $1            # First it checks the Instance ID
     echo " Instance ID provided is $1"  # Prints the message
     echo "Checking the status of $1"    # Prints the message
     ec2_check_status $1
                 # Checks the Status of Instance
   
     status=$(ec2_check_status $id)     # It stores the status of Instance
     if [ "$status" = "running" ]; then     
         echo "I am stopping the instance now"
         ec2_stop_instance $1
         echo "Instance has been stopped successfully"
     else 
         echo "I am starting the instance now"
         ec2_start_instance $1
         echo "Instance has been Started successfully" 
     fi

}

main $1                                 # Actual Script starts from main function
  • Now open visual studio code and open the location of file start-stop-ec2.sh and choose terminal as Bash
  • Now run the script
./start-stop-ec2.sh <Instance-ID>    # Provide the EC2 instance ID along with script
  • Script ran successfully , now lets verify the if EC2 instance has been stopped from running state by going on AWS account.
  • Great , Instance has been successfully stopped. Lets Now ,re- run the script to restart the instance
./start-stop-ec2.sh <Instance-ID>    # Provide the EC2 instance ID along with script

Conclusion

In this tutorial, we demonstrated what is  Amazon EC2 and learnt how to start or stop AWS EC2 using shell script on AWS step by step . It is always a good practice to turn off your lights when you leave your home or room , similarly do it for AWS EC2 instances

Hope this tutorial will help you in understanding the shell script and working with AWS EC2 on Amazon cloud. Please share with your friends

How to Create a IAM user on AWS account using shell script

Are you using correct credentials and right permissions to login to AWS account ? It is very important from a security point of view to grant right permissions to users and identities which access AWS account. To solve access issue AWS has a very crucial service know as AWS IAM that is Identity and access management.

In this tutorial we will go through through what is AWS IAM that is Identity and access management and what is IAM user ? Also we will go through a shell script which will create IAM user from windows machine in AWS account.

Table of Content

  1. What is Shell script ?
  2. What is AWS IAM?
  3. What is AWS IAM user ?
  4. Prerequisites
  5. Install AWS CLI Version 2 on windows machine
  6. How to launch or create AWS IAM user in Amazon account using shell script
  7. Conclusion

What is Shell Scripting or Bash Scripting?

Shell Script is simply a text of file with various or lists of commands that are executed even on terminal or shell one by one. But in order to make thing little easier and run together as a group and in quick time we write them in single file and run it.

Main tasks which are performed by shell scripts are : file manipulation , printing text , program execution. We can include various environmental variables in script that can be used at multiple places , run programs and perform various activities are known as wrapper scripts.

A good shell script will have comments, preceded by a pound sign or hash mark, #, describing the steps. Also we can include conditions or pipe some commands to make more creative scripts.

When we execute a shell script, or function, a command interpreter goes through the ASCII text line-by-line, loop-by-loop, test-by-test, and executes each statement as each line is reached from the top to the bottom.

What is AWS IAM ?

AWS IAM stands for Amazon Managed service Identity and access management service . This is a Amazons of the most important service that helps to control who can access AWS account and what resources in AWS account can be accessed.

When you create AWS account , you have control on entire AWS account that is you have access to everything in the account and this user is known as root user. The Root user can login to AWS account using email address and password.

There are some basic terms which one must know before using IAM service.

  • Resources: Resources are objects that are stored in IAM such as user, role, policy , group and identity provider.
  • Entities: Entities are those objects which can authenticate on AWS account such as root user, IAM user , federated user and assumed IAM roles.
  • Principals: Applications or person who uses entities and work with AWS services. For example Python AWS Boto3 or any person such as Robert.
  • Identities: Identities are the objects which identifies themselves to other service such as IAM user “user1” has access to AWS Ec2 instance. This shows that user1 is showing its own identity that I have access to create ec2 instance . Examples of identity are group, users and role.

What is AWS IAM user?

As discussed earlier when you create AWS account , you have control on entire AWS account that is you have access to everything in the account and this user is known as root user . But this root user is a shared account with all privileges’ and it is not a recommended user to be used for any activity on AWS account.

Instead of using root user which is shared user we have IAM user identity which is an individual user and can have various permissions accordingly. Some user may have access to just EC2 some may have access to AWS S3 or AWS EC2 service or some user may have all permissions as root user.

How can you manually create IAM user in AWS account?

  • In order to create AWS IAM user you must have AWS account . If you don’t have AWS account please create from AWS account or AWS Account
  • Go to AWS console and search for IAM.
  • Click on users in IAM dashboard.
  • Click on Add user
  • Add the username , In case of Access type select both types and add a custom password. You can change this password later as well if you want and finally click on Next permissions
  • Click on Next permissions and choose Attach existing policies
  • For now skip tagging as this demo and finally click on create user
  • IAM user is created successfully . Now Save the Access key ID and Secret access key which is very important for further use.

Prerequisites

  1. AWS account to create AWS IAM user. If you don’t have AWS account please create from AWS account or AWS Account
  2. Windows 7 or plus edition where you will execute the shell script.
  3. Python must be installed on windows machine which will be required by AWS cli. If you want to install python on windows machine follow here
  4. You must have Git bash already installed on your windows machine. If you don’t have install from here
  5. Code editor for writing the shell script on windows machine. I would recommend to use visual studio code on windows machine. If you wish to install visual studio on windows machine please find steps here

In this demo , we will use shell script to launch AWS IAM user. So In order to use shell scripts from your local machine that is windows you will require AWS CLI installed and configured. So First lets install AWS CLI and then configure it.

Install AWS CLI Version 2 on windows machine

  • Download the installed for AWS CLI on windows machine from here
  • Select I accept the terms and then click next button
  • Do custom setup like location of installation and then click next button
  • Now you are ready to install the AWS CLI 2
  • Click finish and now verify the AWS cli
  • Verify the AWS version by going to command prompt and type
aws --version

Now AWS cli version 2 is successfully installed on windows machine, now its time to configure AWS credentials so that our shell script connects AWS account and execute commands.

  • Configure AWS Credentials by running the command on command prompt
aws configure
  • Enter the details such as AWS Access key , ID , region . You can skip the output format as default.
  • Check the location on your system C:\Users\YOUR_USER\.aws file to confirm the the AWS credentials
  • Now, you’re AWS credentials are configured successfully.

How to launch or create AWS IAM user in Amazon account using shell script

Now we have configured AWS cli on windows machine , its time to create our shell script to create AWS IAM user.

  • Create a folder on your desktop and under that create file create-iam-user.sh
#! /bin/bash
 

# To check if access key is setup in your system 

if ! grep -q aws_access_key_id ~/.aws/config; then      # grep -q  Turns off Writing to standard output
   if ! grep -q aws_access_key_id ~/.aws/credentials; then 
      echo "AWS config not found or CLI is not installed"
      exit 1
    fi 
fi


# read command will prompt you to enter the name of IAM user you wish to create 

read -r -p "Enter the username to create": username


# Using AWS CLI Command create IAM user 

aws iam create-user --user-name "${username}" --output json

# Here we are creating access and secret keys and then using query and storing the values in credentials

credentials=$(aws iam create-access-key --user-name "${username}" --query 'AccessKey.[AccessKeyId,SecretAccessKey]'  --output text)

# cut command formats the output with correct coloumn.

access_key_id=$(echo ${credentials} | cut -d " " -f 1)
secret_access_key=$(echo ${credentials} | cut --complement -d " " -f 1)

# echo command will print on the screen 

echo "The Username "${username}" has been created"
echo "The access key ID  of "${username}" is $access_key_id "
echo "The Secret access key of "${username}" is $secret_access_key "

  • Now open visual studio code and open the location of file create-iam-user.sh and choose terminal as Bash
  • Now run the script
./create-iam-user.sh
  • Script ran successfully , now lets verify the IAM user by going on AWS account.

Conclusion

In this tutorial, we demonstrated what is an IAM user  and learnt how to create AWS IAM user using shell script on AWS step by step. With IAM you get a individual access to AWS account and you can manage permissions accordingly.

Hope this tutorial will help you in understanding the shell script and provisioning the AWS IAM user on Amazon cloud. Please share with your friends

How to Launch AWS S3 bucket using Shell Scripting.

We all need a place to store data such deployment scripts, deployment packages also to host a website we require space. In earlier days there were servers where data use to take lot of time to be copied and those servers were not scalable and neither fault tolerant. In case there was issue such as server down or server gets corrupted , data was either lost or application use to remain down for long hours.

In order to solve space or data storage issue with unlimited capacity and scalable with tolerant behaviors Amazon AWS provides a service AWS S3 which solves all these problem.

In this tutorial we will demo how to launch a AWS S3 bucket in Amazon account using Bash or shell scripting .

Table of Content

  1. What is Shell script?
  2. What is Amazon S3 bucket ?
  3. Prerequisites
  4. Install AWS CLI Version 2 on windows machine
  5. How to launch or create AWS S3 bucket in Amazon account using shell script
  6. Conclusion

What is Shell Scripting or Bash Scripting?

Shell Script is simply a text of file with various or lists of commands that are executed even on terminal or shell one by one. But in order to make thing little easier and run together as a group and in quick time we write them in single file and run it.

Main tasks which are performed by shell scripts are : file manipulation , printing text , program execution. We can include various environmental variables in script that can be used at multiple places , run programs and perform various activities are known as wrapper scripts.

A good shell script will have comments, preceded by a pound sign or hash mark, #, describing the steps. Also we can include conditions or pipe some commands to make more creative scripts.

When we execute a shell script, or function, a command interpreter goes through the ASCII text line-by-line, loop-by-loop, test-by-test, and executes each statement as each line is reached from the top to the bottom.

What is Amazon AWS S3 bucket?

AWS S3 , why it is S3 ? The name itself tells that its a 3 word whose alphabet starts with “S” . The Full form of AWS S3 is simple storage service. AWS S3 service helps in storing of unlimited data very safely and efficiently. There is a very basic architecture of AWS S3 . Everything in AWS S3 is a object such as pdf files, zip files , text files or war files anything. The next thing is bucket where all these objects resides.

AWS S3 Service  ➡️ Bucket  ➡️ Objects  ➡️ PDF , HTML DOCS, WAR , ZIP FILES etc.

Some of the features of AWS S3 bucket are:

  • In order to store the data in bucket you will need to upload it.
  • To keep your bucket permissions more secure provide necessary permissions to IAM role or IAM user.
  • Buckets have unique name globally that means there will be only 1 bucket throughout different accounts or any regions.
  • 100 buckets can be created in any AWS account , post that you need to raise a ticket to Amazon.
  • Owner of Bucket is specific to AWS account only.
  • Buckets are created region specific such as us-east-1 , us-east-2 , us-west-1 or us-west-2
  • Bucket objects are objected in AWS S3 using AWS S3 API service.
  • Buckets can be publicly visible that means anybody on the internet can access it. So it is always recommended to keep the public access blocked for all buckets unless very much required.

Prerequisites

  1. AWS account to create S3 bucket. If you don’t have AWS account please create from AWS account or AWS Account
  2. Windows 7 or plus edition where you will execute the shell script.
  3. Python must be installed on windows machine which will be required by AWS cli. If you want to install python on windows machine follow here
  4. You must have Git bash already installed on your windows machine. If you don’t have install from here
  5. Code editor for writing the shell script on windows machine. I would recommend to use visual studio code on windows machine. If you wish to install visual studio on windows machine please find steps here

In this demo , we will use shell script to launch AWS S3 bucket. So In order to use shell scripts from your local machine that is windows you will require AWS CLI installed and configured. So First lets install AWS CLI and then configure it.

Install AWS CLI Version 2 on windows machine

  • Download the installed for AWS CLI on windows machine from here
  • Select I accept the terms and then click next button
  • Do custom setup like location of installation and then click next button
  • Now you are ready to install the AWS CLI 2
  • Click finish and now verify the AWS cli
  • Verify the AWS version by going to command prompt and type
aws --version

Now AWS cli version 2 is successfully installed on windows machine, now its time to configure AWS credentials so that our shell script connects AWS account and execute commands.

  • Configure AWS Credentials by running the command on command prompt
aws configure
  • Enter the details such as AWS Access key , ID , region . You can skip the output format as default.
  • Check the location on your system C:\Users\YOUR_USER\.aws file to confirm the the AWS credentials
  • Now, you’re AWS credentials are configured successfully.

How to launch or create AWS S3 bucket in Amazon account using shell script

Now we have configured AWS cli on windows machine , its time to create our shell script to create AWS S3 bucket.

  • Create a folder on your desktop and under that create file create-s3.sh
#! /usr/bin/bash
# This Script will create S3 bucket and tag the bucket with appropriate name.

# To check if access key is setup in your system 


if ! grep aws_access_key_id ~/.aws/config; then
   if ! grep aws_access_key_id ~/.aws/credentials; then
   echo "AWS config not found or you don't have AWS CLI installed"
   exit 1
   fi
fi

# read command will prompt you to enter the name of bucket name you wish to create 


read -r -p  "Enter the name of the bucket:" bucketname

# Creating first function to create a bucket 

function createbucket()
   {
    aws s3api  create-bucket --bucket $bucketname --region us-east-2
   }


# Creating Second function to tag a bucket 

function tagbucket()    {
    
   aws s3api  put-bucket-tagging --bucket $bucketname --tagging 'TagSet=[{Key=Name,Value="'$bucketname'"}]'
}


# echo command will print on the screen 

echo "Creating the AWS S3 bucket and Tagging it !! "
echo ""
createbucket    # Calling the createbucket function  
tagbucket       # calling our tagbucket function
echo "AWS S3 bucket $bucketname created successfully"
echo "AWS S3 bucket $bucketname tagged successfully "
  • Now open visual studio code and open the location of file create-s3.sh and choose terminal as Bash
  • Now run the script
./create-s3.sh
  • Script ran successfully , now lets verify the AWS S3 bucket by going on AWS account.
  • Click on the Bucket name testing-s3buck2 and then click on properties

  • Great we can see that tagging was also done successfully.

Conclusion

In this tutorial, we demonstrated some benefits of Amazon AWS S3 and learnt how to set up Amazon AWS S3 using shell script on AWS step by step . Most of your phone data and your website data are stored on AWS S3. This service specially to host a website is best in market.

Hope this tutorial will help you in understanding the shell script and provisioning the AWS S3 on Amazon cloud. Please share with your friends

The Ultimate Guide for Beginners on Bash Scripting / Shell Scripting step by step

Table of content

  1. What is Shell ?
  2. What is Bash ?
  3. What is Shell Scripting or Bash Scripting?
  4. How to create Shell scripts and execute it ?
  5. Basic fundamentals of Shell Scripting?
  6. Run bash scripts on Visual Studio
  7. Conclusion

What is Shell ?

Shell is a command line interpreter and a programming language, basically what ever you are executing on terminal of your Linux machine is a shell command. There are thousands of commands which are already inbuilt such as cat , cd , ls , kill , history or pwd. The shell provides variables, flow control constructs, scripts, and functions. It also allows you to pipe commands, substitute command , do conditional testing , iterations etc. Whatever scripts you run , commands you execute are executed on shell or commonly known as Unix Shell.

  • There are different types of Unix shell available:
    • Bourne shell (sh) which is present in /bin/sh or /usr/bin/sh
    • Korn shell (ksh) which is present in /bin/ksh or /usr/bin/ksh
    • Bourne Again shell (bash) which is present in /bin/bash or /usr/bin/bash
    • POSIX shell (sh)
    • C shell (csh)
    • TENEX/TOPS C shell (tcsh)

  • To check on which shell you’re
 echo $SHELL

What is Bash?

Bash is a Unix shell and also a command line interpreter. It is also known as Bourne again shell . This is improved version of Bourne shell that “sh”. This is present in almost all the operating system. It is a default login shell mostly in all Linux distributions. Also it is default login shell in Apple macOS and Solaris. Bash process shell commands. In bash you write all your commands in text format and execute commands. When bash executes any commands from other files then they can called as shell scripts.

It also contains keywords , variable , functions etc. just like sh shell . It is very much similar to Bourne shell (sh) .Latest version is bash-5.1 which was released in 2020-12-07.

To check the location of bash , you can use command.

echo $BASH

What is Shell Scripting or Bash Scripting?

Shell Script is simply a text of file with various or lists of commands that are executed even on terminal or shell one by one. But in order to make thing little easier and run together as a group and in quick time we write them in single file and run it.

Main tasks which are performed by shell scripts are : file manipulation , printing text , program execution. We can include various environmental variables in script that can be used at multiple places , run programs and perform various activities are known as wrapper scripts.

A good shell script will have comments, preceded by a pound sign or hash mark, #, describing the steps. Also we can include conditions or pipe some commands to make more creative scripts.

When we execute a shell script, or function, a command interpreter goes through the ASCII text line-by-line, loop-by-loop, test-by-test, and executes each statement as each line is reached from the top to the bottom.

How to create Shell scripts and execute it ?

Now we will create a very simple script and execute it.

  • Create a directory under /opt directory
mkdir script-demo
  • Create a file myscript.sh
touch myscript.sh
  • Edit the file
vi myscript.sh
  • Paste the code as shown in code snippet
#!/bin/bash
# This is a comment 
echo Hello World, its automateinfra.com here!
echo I am using $SHELL which is a default shell. 
  • Let us go through the code
    • #! is known as Shebang which is a syntax for a bash script. You can ignore this if you run your script by adding prefix bash . For example bash myscript.sh
    • Here #!/bin/bash or #!/usr/bin/bash declares a Bourne-Again (Bash) shell
    • Similarly for Bourne shell we can use #!/bin/sh or #!/usr/bin/sh declares a Bourne shell
    • # is a comment
    • echo is a command
  • Grant the execution permissions
chmod + x myscript.sh
  • Execute the script
./myscript.sh
  • Script has been executed successfully.

Basic fundamentals of Shell Scripting

  • Shell Scripts are case sensitive
  • To execute a function
function function-name 
{
  Commands
}
  • You can run your scripts with specific shells as
    • ksh myscript.sh
    • bash myscript.sh
    • csh myscript.sh
  • If you are running a script in a particular location you should provide absolute path and if you are running in same directory then use “./”
/home/ubuntu/myscript.sh  # Complete path

./myscript                # Run in same directory
  • Use of if loops
if [condition]
then 
   command
else
   command
fi
  • Use of for loops
for condition
do
   commands
done
  • To Create a variable we use “$” symbol and this substitutes the variable to a value.
a = 5
echo $a
  • The command-line arguments $1, $2, $3,…$9 are positional parameters, with $0 pointing to the actual command, program, shell script, or function and $1, $2, $3, …$9 as the arguments to the command
  • Let us know see Special variables
$0 is the filename of the current script.
$n These variables correspond to the arguments with which a script was invoked.
$# The number of arguments supplied to a script.
$* All the arguments are double quoted. If a script receives two arguments, $* is equivalent to $1 $2.
$@ All the arguments are individually double quoted. If a script receives two arguments, $@ is equivalent to $1 $2.
$? The exit status of the last command executed.
$$ The process number / process ID of the current shell.
$! The process number of the last background command.
Table 1.1

Run bash scripts on Visual Studio

  • From the dropdown menu of terminals select default shell
  • Then you will see Git Bash and click on it.
  • Now type a command to test if bash script works
hello automateinfra.com

Conclusion

You should now have a very sound knowledge of what is shell , what is Bash shell and Shell Scripting or Bash scripting. . Also we discussed how to work create a shell script and what are basic fundamentals or points one should know to getting started on bash scripting. Finally we ran bash script in windows machine on Microsoft’s Visual Studio Code.

This tutorial consists of all the practical’s which were done on our lab server with lots of hard work and efforts.

Please share the tutorial with everyone if you like it and hoping you get benefit out of this tutorial.