0% found this document useful (0 votes)
27 views3 pages

Elk

Uploaded by

Praneeth Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Elk

Uploaded by

Praneeth Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Why we use IDE is because it is easy to use …they will have syntax checks and easy to develop the

code compared to
traditional linux window.Therfore all the code will be developed inside the IDE.

In our course we will develop code inside VSCODE in our laptop.Then we will push the code into GITHUB repository.
Then we will clone/pull the code into an instance deployed in AWS. See pic below

There are so many advantages of git: Version controlling,Track the changes,Review the changes,Branching,Security and
backup.

Git is a distributed version control system.The main advantage of distributed version control systems are as follows.In
DVCS we always have a local copy in every developers laptop…so we always have a backup copy preserved.A developers
single laptop enough to bring back all the code even if entire GIT centralized server fails .There is a concept of ‘staging
area’ in the DVS…where we can selectively send the changes to the central repo.Another advanatage of DVCS is the
developers can work offline with the local repo.But in the case ‘centralised version control system’ the developers
always needs to be connected with the centralized repo while working .

example of DVCS : Git

example of CVCs : SVN


In DVS like git we can send few ‘selected’ files to staging area leaving behind some ‘in-progress’ files …(for ex:
Bhupinders sirs class -shirts example) but whereas in CVS we have to push all the files(whether they are completed or
not) into the repo directly.This is the major disadvantage with the CVS.

git clone : will clone the code into your laptop

git add : will add the selected files to the staging area

git commit -m ‘first commit ’ : will do the commit to the local repo

git push origin master : will push the code into the CVS.

SSH AUTHENTICATION TO GITHUB :

We all know that we will import the public key into Linux server and with the help of the private key we will login to the
Linux server by using  ssh -i /path/of /the/private/key user@publicip_of_linuxserver. This is the step to connect to
Linux server.

Similarly , we can use ssh access to Github.Let’s see how can we do that.Always remember we always import the public
key into the server…therefore we have to import the public key into the github server.In your laptop we will have the
private key.But how we do we get this private and public key into our laptop..?ANS : simple, we use a command in our
Linux terminal  ssh-keygen . This ssh-keygen will generate a pair of keys which consists of public and private key . Once
you establish a connection between your laptop and Hithub server by using ssh authentication ie by using public and
private keys then we don’t need to enter the user name and the password again and again.Thi s is the major advantage
and secure aswell.So, now we will see the step by step method to establish a ssh connection between your laptop and
Github.

If someone says Bash script that means they mean to sya it is hell script.Therefore we can safely say BASH SCRIPT and
SHELL SCRIPT means same.

Shell script or Bash script ends with .sh

To execute a shell script we need to say  sh example.sh

Any programming language or scripting language will have only 5 core concepts. These 5 core concepts will not change
for any programming or scripting language in the world..only the syntax changes. The 5 core concepts are data
types,variables,conditions,loops,functions .

There is a concept in s/w called DRYDon’t Repeat Yourself

If you feel that anything is used repeatedly then the best way is to make use of variables.

In Shell scripting we don’t need to declare the datatypes. This is intelligent. In C or C++ we have to declare the data type
while doing the programming.But in Shell or Python we don’t need to declare the data type.

In Shell scripting we should not worry about data types..as shell is intelligent. In Shell predominantly everything by
default is considered as NUMBER data type.

Array means simplearray can hold multiple values.

https://www.youtube.com/watch?v=kHkQnuYzwoo

If you want to check whether a user is a root user or not then we have to use a command  id -u

If the above command id -u returns a value zero then that means he is a root-user

Shell script by default will not stop if it faces an error in the middle of the program…

$?  Linux server will store the previous commands exit status in $?

If $? returns zero…then that means the previous command has been executed successfully.

You might also like