SlideShare a Scribd company logo
1 of 24
Download to read offline
Basics of
Linux Commands,
Git and GitHub
- Devang Garach
Teacher’s Day 2020
M.C.A. Department
● History of Linux? (Fast Forward)
● Brief overview of Linux OS files/ folders system
● Basics Commands on Linux (Useful in daily routine)
● What is Git? How to use?
● Difference between Git and GitHub
● How can we host HTML based website,
and to get github.io domain, Free of cost ₹0/-
Agenda
● It is one of the flaour of UNIX
● Linus Torvalds modified UNIX and called called it as LINUX
(LINUS+UNIX=LINUX)
● Linus together with Richard stallman made LINUX free
○ And Agencies such as Free Software Foundation created
GNU project to provide free software
● Linux is open source operating system
● GNU/Linux flavours
○ Red Hat, Caldera, Debian, SuSE and Mandrake.
● It also has GUI Environment like GNOME and KDE (K Desktop
Environment)
● Technically, Linux is the Kernel, which is derived from UNIX
History of Linux
● Linux has Two components : Kernel and Shell.
○ Linux Kernel is the the program which runs in background
and convert all your commands to machine dependent
signals. It is the core of the OS.
○ Shell is the interface between the user and the kernel.
● Command Line Interface : bash, sh, dash, zsh etc.
● Graphical User Interface : GNOME, KDE, Unity, Xfce,
Pantheon, etc.
History of Linux (Continue...)
What is Linux Kernel?
● Graphical Environment - KDE/ GNOME/IceWM, others ...
● Browser - Mozilla
● E-mail - Kmail / Evolution
● Instant Messenger - Gaim
● FTP Client - gftp
● Multimedia - XMMS/ Xine / Cdparania / Cdrecord
● Image Browser - GQView
● Image Editor - GIMP
● Security - iptables / ipchains
● Office Suite - OpenOffice / StarOffice / KOffice
● File Browser - Konqueror
● Editors - Joe, VI, Kwrite, Gedit, OpenOffice Writer
● Games - Quake, Doom, SimCity, many others…
● Database - Postgres
● Server - Apache Server
History of Linux (Continue...)
Linux Applications (supported in earlier stage)
Brief Overview of Linux File System
Brief Overview of Linux File System (Continue)
/ (root) - The root contains, user's home directory
/bin/ - This directory where many commonly used executable UNIX commands
resides here
/boot/ - This directory holds files used in booting the operating system
/dev/ - It contains device specific files
/etc/ - It contains system configuration files
/home/ - It contains user directories and files
/lib/ - It contains all library files
/media/ - Directory contains subdirectories where removable media devices inserted
into the computer are mounted.
/mnt/ - It contains device files related to system related to mounted devices
/opt/ - In directory where to install unbundled packages, each in its own subdirectory
/root/ - The root system administrator users directory
/sbin/ - Commands for system administrator
/srv/ - contains site-specific data which is served by this system
/tmp/ - Storage for temporary files which are periodically removed from the file
System
/usr/ - It have several subdirectories that contain additional UNIX commands and
data files
/usr/bin/ - that contains most of the executable files
/usr/include - Contains standard header files used by c program
/usr/lib/ - Contains object files and libraries
/usr/sbin/ - It is used to store many application programs
/usr/man/ - Manuals pages stored here.
/var/ - Variable part of the file system
. Contains print jobs and outgoing and incoming mail
/var/cache/ - It is intended for cached data from applications. Such data is locally
generated as a result of time-consuming I/O or calculation
/var/log/ - This directory contains logs from the OS itself, services, and various
applications running on the system.
/var/spool/ - Contains data which is awaiting some kind of later processing
/var/tmp/ - This directory is for programs that require temporary files or
directories that are preserved between system reboots
Brief Overview of Linux File System (Continue)
Basics Commands
apt
apt-get
sudo
su
man
clear
who
whoami
uname
ls
chmod
ifconfig
free
lshw
lspci
touch
cat
ps
kill
passwd
zip
unzip
gzip
gunzip
mv
cp
rm
rmdir
mkdir
cd
chown
echo $HOME
printf
Basics Commands Theory
Advanced Package Tool, or ‘apt’, is a free-software user interface that works with core
libraries to handle the installation and removal of software on Debian, Ubuntu, and
related Linux distributions.
apt
‘sudo’ command allows you to run programs with the security privileges of another user
(by default, as the superuser). It prompts you for your personal password and confirms
your request to execute a command by checking a file, called sudoers , which the system
administrator configures.
sudo
‘su’ is used to switch from one account to another. User will be prompted for the
password of the user switching to.
su
‘man’ command in Linux is used to display the user manual of any command that we can
run on the terminal. It provides a detailed view of the command which includes NAME,
SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, etc.
man
Basics Commands Theory (Continue...)
‘clear’ command, clears the terminal screen
clear
‘who’ command lets you display the users that are currently logged into your Unix
computer system, with date and time.
who
‘whoami’ command lets you display the users that are currently logged into the system.
whoami
‘uname’ command reports basic information about a computer's software and
hardware. When used without any options, uname reports the name, but not the
version number, of the kernel (i.e., the core of the operating system).
uname
‘ls’ command is used for listing the contents of a directory or directories given to it via
standard input. It writes results to standard output. The ‘ls’ command supports showing
a variety of information about files, sorting on a range of options and recursive listing.
ls -l command which lists the files in the working directory in long format.
ls
Basics Commands Theory (Continue...)
‘chmod’ is the command and system call which is used to change the access permissions
of file system objects
In Linux, each file is associated with an owner and a group and assigned with permission
access rights for three different classes of users:
-----------------------------------
The file ‘owner’. -u |
The ‘group’ members. -g |
Others (everybody else). -o |
-----------------------------------
ls -l filename.txt
chmod
r : Permission to read the file.
w : Permission to write (or delete) the file.
x : Permission to execute the file, or, in the case
of a directory, search it.
- : No permission
Basics Commands Theory (Continue...)
u - The file owner.
g - The users who are members of the group.
o - All other users.
a - All users, identical to ugo
chmod
- Removes the specified permissions.
+ Adds specified permissions.
= Changes the current permissions to the specified
permissions. If no permissions are specified after
the = symbol, all permissions from the specified
user class are removed.
Basics Commands Theory (Continue...)
Permission number:
File permission can be represented in a numeric or symbolic format. In this article, we’ll
focus on the numeric format.
The permission number can consist of three or four digits, ranging from 0 to 7.
When 3 digits number is used, the first digit represents the permissions of the file’s
owner, the second one the file’s group and the last one all other users.
The write, read, and execute permissions have the following number value:
r (read) = 4
w (write) = 2
x (execute) = 1
no permissions = 0
The permissions digit of a specific user class is the sum of the values of the permissions
for that class.
chmod (Method 2)
Basics Commands Theory (Continue...)
Each digit of the permissions number may be a sum of 4, 2, 1 and 0:
0 (0+0+0) – No permission.
1 (0+0+1) – Only execute permission.
2 (0+2+0) – Only write permission.
3 (0+2+1) – Write and execute permissions.
4 (4+0+0) – Only read permission.
5 (4+0+1) – Read and execute permission.
6 (4+2+0) – Read and write permissions.
7 (4+2+1) – Read, write, and execute permission.
For example, if the permission number is set to 750 it means that the file’s owner has
read, write and execute permission, file’s group has read and execute permissions, and
other users have no permissions:
Owner: rwx = 4+2+1=7
Group: r-x = 4+0+1=5
Others: --- = 0+0+0=0
chmod (Method 2)
Basics Commands Theory (Continue...)
‘ifconfig’ stands for "Interface Configuration" . It is a utility for Linux machines to
configure,assign,add,delete,control and query network interface in Unix/Linux
machine. Common Linux users uses ‘ifconfig’ command to assign ip address and
netmask to an interface or to disable or enable a given interface
ifconfig
‘free’ command displays how much of your computer's memory is in use and how much
is still available for programs to use
free
‘lshw’ (list hardware) which is used to generate the detailed information of the system's
hardware configuration from various files in the /proc directory.
lshw
‘lspci’ is a command on Unix-like operating systems that prints ("lists") detailed
information about all PCI buses and devices in the system
lspci
‘touch’ command is used to create empty files & also changes the timestamps of existing files
touch
Basics Commands Theory (Continue...)
‘cat’ command allows us to create single or multiple files, view contain of file,
concatenate files and redirect output in terminal or files.
cat
‘ps’ (Process Status), is a command line utility that is used to display or view information
related to the processes running in a Linux system.
ps
‘kill’ (list hardware) which is used to generate the detailed information of the system's
hardware configuration from various files in the /proc directory.
kill
‘passwd’ command is used to change the password of system users. If the passwd
command is executed by non-root user then it will ask for the current password and
then set the new password of a user who invoked the command. When this command is
executed by super user or root then it can reset the password for any user including root
without knowing the current password.
passwd
Basics Commands Theory (Continue...)
‘cat’ command allows us to create single or multiple files, view contain of file,
concatenate files and redirect output in terminal or files.
zip
‘unzip’ command extracts all files from the specified ZIP archive to the current directory
unzip
‘gzip’ is one of the most popular compression algorithms that allow you to reduce the
size of a file.
gzip
‘gunzip’ is a command-line tool for decompressing Gzip files.
gunzip
‘mv’ to move files / folders
mv
‘cp’ to copy files / folders
cp
‘rm’ to remove files
rm
‘rmdir’ empty directory
rmdir
‘mkdir’ to make directory
mkdir
‘cd’ to change directory
cd
● Version Control System(VCS) for tracking changes in computer files,
developed by Linus Torvald in 2005
● Distributed version control/decentralized version control system
● Coordinates work between multiple developers
● who made, what changes and when?
● Revert back at any time
● Local & Remote Repository
Concept of Git
● keep track of code history
● takes "snapshots" of your files
● you decides when to take a snapshot by making a "commit"
● you can visit any snapshot at any time
● you can stage files before commiting
What is Git?
● git init // initalilze local git repository
● git add <file> // add files to index
● git status // check status of working tree
● git commit // commit changes in index
● git push // push to remote repository
● git pull // pull latest from remote repository
● git clone // clone repository into new directory
Basics Commands in git?
● Linux (Debian) OS
sudo apt-get install git
● Linux (Fedora) OS
sudo yum install git
● Mac OS
http://git-scm.com/download/mac
● Windows OS
http://git-scm.com/download/win
How to Install Git?
● git --version
● git init
● git config --global user.name 'Devang Garach'
● git config --global user.email 'devanggarach@gmail.com'
● git add index.html | git add . | git add *.html | git add -A
● git status
● git rm --cached index.html
● git branch branch_name
● git checkout branch_name
● git commit | git commit -m ‘message’
● touch .gitignore
● git merge branch_name
● git remote add origin https://from_github_address
● git push -u origin master
● git clone https://from_github_address
● git pull | git log | git rebase branch_name | git revert 8digitcode_from_log
Git commands
Difference Between Git & GitHub
Repository
Repository
Working Copy Working Copy
Working Copy
Repository
Repository
Distributed Version Control System
Server
push
pull
push
pull
commit
update
commit
update
commit
update
push
pull
Thank you

More Related Content

What's hot

What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...Edureka!
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesDatabricks
 
Mother of Language`s Langchain
Mother of Language`s LangchainMother of Language`s Langchain
Mother of Language`s LangchainJun-hang Lee
 
Web analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comWeb analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comJungsu Heo
 
DVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projectsDVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projectsFrancesco Casalegno
 
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...Databricks
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersYajushi Srivastava
 
Apache Spark sql
Apache Spark sqlApache Spark sql
Apache Spark sqlaftab alam
 
Building an Observability platform with ClickHouse
Building an Observability platform with ClickHouseBuilding an Observability platform with ClickHouse
Building an Observability platform with ClickHouseAltinity Ltd
 
Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...
Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...
Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...Edureka!
 
Container orchestration overview
Container orchestration overviewContainer orchestration overview
Container orchestration overviewWyn B. Van Devanter
 
GIT presentation
GIT presentationGIT presentation
GIT presentationNaim Latifi
 
The 12 Factor App
The 12 Factor AppThe 12 Factor App
The 12 Factor Apprudiyardley
 

What's hot (20)

What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
What is DevOps | DevOps Introduction | DevOps Training | DevOps Tutorial | Ed...
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
 
Mother of Language`s Langchain
Mother of Language`s LangchainMother of Language`s Langchain
Mother of Language`s Langchain
 
Web analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.comWeb analytics at scale with Druid at naver.com
Web analytics at scale with Druid at naver.com
 
What is MLOps
What is MLOpsWhat is MLOps
What is MLOps
 
DVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projectsDVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projects
 
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Apache Spark sql
Apache Spark sqlApache Spark sql
Apache Spark sql
 
Building an Observability platform with ClickHouse
Building an Observability platform with ClickHouseBuilding an Observability platform with ClickHouse
Building an Observability platform with ClickHouse
 
Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...
Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...
Apache Spark Training | Spark Tutorial For Beginners | Apache Spark Certifica...
 
Container orchestration overview
Container orchestration overviewContainer orchestration overview
Container orchestration overview
 
Grafana vs Kibana
Grafana vs KibanaGrafana vs Kibana
Grafana vs Kibana
 
Curso gratuito de Docker
Curso gratuito de DockerCurso gratuito de Docker
Curso gratuito de Docker
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
 
Git training v10
Git training v10Git training v10
Git training v10
 
Observability
ObservabilityObservability
Observability
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Git basic
Git basicGit basic
Git basic
 
The 12 Factor App
The 12 Factor AppThe 12 Factor App
The 12 Factor App
 

Similar to Basics of Linux Commands, Git and Github

Similar to Basics of Linux Commands, Git and Github (20)

Unix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basiUnix_Introduction_BCA.pptx the very basi
Unix_Introduction_BCA.pptx the very basi
 
I Am Linux-Introductory Module on Linux
I Am Linux-Introductory Module on LinuxI Am Linux-Introductory Module on Linux
I Am Linux-Introductory Module on Linux
 
system management -shell programming by gaurav raikar
system management -shell programming by gaurav raikarsystem management -shell programming by gaurav raikar
system management -shell programming by gaurav raikar
 
system management -shell programming by Gaurav raikar
system management -shell programming by Gaurav raikarsystem management -shell programming by Gaurav raikar
system management -shell programming by Gaurav raikar
 
Chapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix ConceptsChapter 2 Introduction to Unix Concepts
Chapter 2 Introduction to Unix Concepts
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals  Lesson 1 Linux System Fundamentals
Lesson 1 Linux System Fundamentals
 
Linux
LinuxLinux
Linux
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Nithi
NithiNithi
Nithi
 
Ch1 linux basics
Ch1 linux basicsCh1 linux basics
Ch1 linux basics
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in Linux
 
Linux
LinuxLinux
Linux
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
Basic orientation to Linux
Basic orientation to LinuxBasic orientation to Linux
Basic orientation to Linux
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Linux basic
Linux basicLinux basic
Linux basic
 
Linux
LinuxLinux
Linux
 

More from Devang Garach

AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10Devang Garach
 
A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9Devang Garach
 
Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8Devang Garach
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Devang Garach
 
Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5Devang Garach
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Devang Garach
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Devang Garach
 
M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]Devang Garach
 

More from Devang Garach (9)

AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10
 
A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9
 
Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6
 
Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5Overview of React.JS - Internship Presentation - Week 5
Overview of React.JS - Internship Presentation - Week 5
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3
 
M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]
 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

Basics of Linux Commands, Git and Github

  • 1. Basics of Linux Commands, Git and GitHub - Devang Garach Teacher’s Day 2020 M.C.A. Department
  • 2. ● History of Linux? (Fast Forward) ● Brief overview of Linux OS files/ folders system ● Basics Commands on Linux (Useful in daily routine) ● What is Git? How to use? ● Difference between Git and GitHub ● How can we host HTML based website, and to get github.io domain, Free of cost ₹0/- Agenda
  • 3. ● It is one of the flaour of UNIX ● Linus Torvalds modified UNIX and called called it as LINUX (LINUS+UNIX=LINUX) ● Linus together with Richard stallman made LINUX free ○ And Agencies such as Free Software Foundation created GNU project to provide free software ● Linux is open source operating system ● GNU/Linux flavours ○ Red Hat, Caldera, Debian, SuSE and Mandrake. ● It also has GUI Environment like GNOME and KDE (K Desktop Environment) ● Technically, Linux is the Kernel, which is derived from UNIX History of Linux
  • 4. ● Linux has Two components : Kernel and Shell. ○ Linux Kernel is the the program which runs in background and convert all your commands to machine dependent signals. It is the core of the OS. ○ Shell is the interface between the user and the kernel. ● Command Line Interface : bash, sh, dash, zsh etc. ● Graphical User Interface : GNOME, KDE, Unity, Xfce, Pantheon, etc. History of Linux (Continue...) What is Linux Kernel?
  • 5. ● Graphical Environment - KDE/ GNOME/IceWM, others ... ● Browser - Mozilla ● E-mail - Kmail / Evolution ● Instant Messenger - Gaim ● FTP Client - gftp ● Multimedia - XMMS/ Xine / Cdparania / Cdrecord ● Image Browser - GQView ● Image Editor - GIMP ● Security - iptables / ipchains ● Office Suite - OpenOffice / StarOffice / KOffice ● File Browser - Konqueror ● Editors - Joe, VI, Kwrite, Gedit, OpenOffice Writer ● Games - Quake, Doom, SimCity, many others… ● Database - Postgres ● Server - Apache Server History of Linux (Continue...) Linux Applications (supported in earlier stage)
  • 6. Brief Overview of Linux File System
  • 7. Brief Overview of Linux File System (Continue) / (root) - The root contains, user's home directory /bin/ - This directory where many commonly used executable UNIX commands resides here /boot/ - This directory holds files used in booting the operating system /dev/ - It contains device specific files /etc/ - It contains system configuration files /home/ - It contains user directories and files /lib/ - It contains all library files /media/ - Directory contains subdirectories where removable media devices inserted into the computer are mounted. /mnt/ - It contains device files related to system related to mounted devices /opt/ - In directory where to install unbundled packages, each in its own subdirectory /root/ - The root system administrator users directory /sbin/ - Commands for system administrator /srv/ - contains site-specific data which is served by this system /tmp/ - Storage for temporary files which are periodically removed from the file System
  • 8. /usr/ - It have several subdirectories that contain additional UNIX commands and data files /usr/bin/ - that contains most of the executable files /usr/include - Contains standard header files used by c program /usr/lib/ - Contains object files and libraries /usr/sbin/ - It is used to store many application programs /usr/man/ - Manuals pages stored here. /var/ - Variable part of the file system . Contains print jobs and outgoing and incoming mail /var/cache/ - It is intended for cached data from applications. Such data is locally generated as a result of time-consuming I/O or calculation /var/log/ - This directory contains logs from the OS itself, services, and various applications running on the system. /var/spool/ - Contains data which is awaiting some kind of later processing /var/tmp/ - This directory is for programs that require temporary files or directories that are preserved between system reboots Brief Overview of Linux File System (Continue)
  • 10. Basics Commands Theory Advanced Package Tool, or ‘apt’, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian, Ubuntu, and related Linux distributions. apt ‘sudo’ command allows you to run programs with the security privileges of another user (by default, as the superuser). It prompts you for your personal password and confirms your request to execute a command by checking a file, called sudoers , which the system administrator configures. sudo ‘su’ is used to switch from one account to another. User will be prompted for the password of the user switching to. su ‘man’ command in Linux is used to display the user manual of any command that we can run on the terminal. It provides a detailed view of the command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, etc. man
  • 11. Basics Commands Theory (Continue...) ‘clear’ command, clears the terminal screen clear ‘who’ command lets you display the users that are currently logged into your Unix computer system, with date and time. who ‘whoami’ command lets you display the users that are currently logged into the system. whoami ‘uname’ command reports basic information about a computer's software and hardware. When used without any options, uname reports the name, but not the version number, of the kernel (i.e., the core of the operating system). uname ‘ls’ command is used for listing the contents of a directory or directories given to it via standard input. It writes results to standard output. The ‘ls’ command supports showing a variety of information about files, sorting on a range of options and recursive listing. ls -l command which lists the files in the working directory in long format. ls
  • 12. Basics Commands Theory (Continue...) ‘chmod’ is the command and system call which is used to change the access permissions of file system objects In Linux, each file is associated with an owner and a group and assigned with permission access rights for three different classes of users: ----------------------------------- The file ‘owner’. -u | The ‘group’ members. -g | Others (everybody else). -o | ----------------------------------- ls -l filename.txt chmod r : Permission to read the file. w : Permission to write (or delete) the file. x : Permission to execute the file, or, in the case of a directory, search it. - : No permission
  • 13. Basics Commands Theory (Continue...) u - The file owner. g - The users who are members of the group. o - All other users. a - All users, identical to ugo chmod - Removes the specified permissions. + Adds specified permissions. = Changes the current permissions to the specified permissions. If no permissions are specified after the = symbol, all permissions from the specified user class are removed.
  • 14. Basics Commands Theory (Continue...) Permission number: File permission can be represented in a numeric or symbolic format. In this article, we’ll focus on the numeric format. The permission number can consist of three or four digits, ranging from 0 to 7. When 3 digits number is used, the first digit represents the permissions of the file’s owner, the second one the file’s group and the last one all other users. The write, read, and execute permissions have the following number value: r (read) = 4 w (write) = 2 x (execute) = 1 no permissions = 0 The permissions digit of a specific user class is the sum of the values of the permissions for that class. chmod (Method 2)
  • 15. Basics Commands Theory (Continue...) Each digit of the permissions number may be a sum of 4, 2, 1 and 0: 0 (0+0+0) – No permission. 1 (0+0+1) – Only execute permission. 2 (0+2+0) – Only write permission. 3 (0+2+1) – Write and execute permissions. 4 (4+0+0) – Only read permission. 5 (4+0+1) – Read and execute permission. 6 (4+2+0) – Read and write permissions. 7 (4+2+1) – Read, write, and execute permission. For example, if the permission number is set to 750 it means that the file’s owner has read, write and execute permission, file’s group has read and execute permissions, and other users have no permissions: Owner: rwx = 4+2+1=7 Group: r-x = 4+0+1=5 Others: --- = 0+0+0=0 chmod (Method 2)
  • 16. Basics Commands Theory (Continue...) ‘ifconfig’ stands for "Interface Configuration" . It is a utility for Linux machines to configure,assign,add,delete,control and query network interface in Unix/Linux machine. Common Linux users uses ‘ifconfig’ command to assign ip address and netmask to an interface or to disable or enable a given interface ifconfig ‘free’ command displays how much of your computer's memory is in use and how much is still available for programs to use free ‘lshw’ (list hardware) which is used to generate the detailed information of the system's hardware configuration from various files in the /proc directory. lshw ‘lspci’ is a command on Unix-like operating systems that prints ("lists") detailed information about all PCI buses and devices in the system lspci ‘touch’ command is used to create empty files & also changes the timestamps of existing files touch
  • 17. Basics Commands Theory (Continue...) ‘cat’ command allows us to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files. cat ‘ps’ (Process Status), is a command line utility that is used to display or view information related to the processes running in a Linux system. ps ‘kill’ (list hardware) which is used to generate the detailed information of the system's hardware configuration from various files in the /proc directory. kill ‘passwd’ command is used to change the password of system users. If the passwd command is executed by non-root user then it will ask for the current password and then set the new password of a user who invoked the command. When this command is executed by super user or root then it can reset the password for any user including root without knowing the current password. passwd
  • 18. Basics Commands Theory (Continue...) ‘cat’ command allows us to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files. zip ‘unzip’ command extracts all files from the specified ZIP archive to the current directory unzip ‘gzip’ is one of the most popular compression algorithms that allow you to reduce the size of a file. gzip ‘gunzip’ is a command-line tool for decompressing Gzip files. gunzip ‘mv’ to move files / folders mv ‘cp’ to copy files / folders cp ‘rm’ to remove files rm ‘rmdir’ empty directory rmdir ‘mkdir’ to make directory mkdir ‘cd’ to change directory cd
  • 19. ● Version Control System(VCS) for tracking changes in computer files, developed by Linus Torvald in 2005 ● Distributed version control/decentralized version control system ● Coordinates work between multiple developers ● who made, what changes and when? ● Revert back at any time ● Local & Remote Repository Concept of Git ● keep track of code history ● takes "snapshots" of your files ● you decides when to take a snapshot by making a "commit" ● you can visit any snapshot at any time ● you can stage files before commiting What is Git?
  • 20. ● git init // initalilze local git repository ● git add <file> // add files to index ● git status // check status of working tree ● git commit // commit changes in index ● git push // push to remote repository ● git pull // pull latest from remote repository ● git clone // clone repository into new directory Basics Commands in git?
  • 21. ● Linux (Debian) OS sudo apt-get install git ● Linux (Fedora) OS sudo yum install git ● Mac OS http://git-scm.com/download/mac ● Windows OS http://git-scm.com/download/win How to Install Git?
  • 22. ● git --version ● git init ● git config --global user.name 'Devang Garach' ● git config --global user.email 'devanggarach@gmail.com' ● git add index.html | git add . | git add *.html | git add -A ● git status ● git rm --cached index.html ● git branch branch_name ● git checkout branch_name ● git commit | git commit -m ‘message’ ● touch .gitignore ● git merge branch_name ● git remote add origin https://from_github_address ● git push -u origin master ● git clone https://from_github_address ● git pull | git log | git rebase branch_name | git revert 8digitcode_from_log Git commands
  • 23. Difference Between Git & GitHub Repository Repository Working Copy Working Copy Working Copy Repository Repository Distributed Version Control System Server push pull push pull commit update commit update commit update push pull