LINUX
&
SHELL SCRIPTING
Session-1
Agenda
◦ The first 20 hours to learn anything : Josh Kaufman
◦ 5W’s 1H
◦ Introduction to Operating Systems
◦ Linux Introduction (5w’s h)
◦ Open-Source
◦ Distributions
◦ File Systems
◦ Kernel – important parts of the kernel
◦ Linux Vs Windows
◦ Virtualization – why?
The first 20 hours to learn anything
Key Points https://www.youtube.com/watch?v=5MgBikgcWnY
◦ Deconstruct the Skill
◦ Learn enough to self correct
◦ Remove Practice Barriers
◦ Practice 20 hours on the skill
Deconstruct the skill
Course Enrolled : Devops This Course
Basics of Linux
Basic Commands
Administration
Networking
Shell Scripting
And much more….
Learn enough to self-correct
Instructor teaching in class Student Contributing
◦ echo ◦ man echo
◦ ls ◦ ls –l –t – r –i –h –a
◦ ip addr ◦ uname -a
◦ uname
Students experimenting with different
on Ubuntu Operating System features, exploring things, getting
doubts,
Within the subject
Remove Practice Barriers
Distractions Technical issues
Practice 20 hours
Non - Productive Productive
Sales Exercise
45Mins 5Mins 10 Mins
Exercise Break Cardio Break Weight
5W1H in practice
Question yourself around the topics you’re
what learning
Example:
how where What is Linux?
Where is Linux used?
When to use Linux?
5w1h Why should I learn Linux?
Who developed Linux?
who when How in real world Linux gained popularity?
why
Introduction to Operating Systems
Scenario 1 Solution
◦ I have a bare-metal Install OS
◦ I want you to open google chrome Install Drivers
and access facebook.com Connect to Internet
Download Chrome
Access facebook.com
An operating system (OS) is system software
that manages computer hardware, software
resources, and provides common services for
computer programs.
(source: Wikipedia)
What are Application Programs?
Linux Operating System
What is Linux? What is Unix?
◦ An Open-Source operating system ◦ Unix is an operating system that is
and community developed operating installed only on specific hardware
system for computers, servers, ◦ Unix developed for multi user and
mainframes, mobile devices and multi tasking purposes in mid 1970s
embedded devices.
◦ Unix mostly used by Sun Solaris and
supports only few file systems
◦ Ubuntu, Debian, Fedora, OpenSuse, ◦ IBM AIX, Solaris, HP-UX, Darwin, macOS X,
Redhat, Android etc., etc.
◦ https://www.linuxvmimages.com/
Where do we find Linux?
https://blog.netdevgroup.com/2016/12/25-cool-linux-facts/
Who
developed
Linux?
Linus Torvalds, developed
the kernel.
https://en.wikipedia.org/w
iki/Linus_Torvalds
Who uses Linux?
US Govt, NASA, Metro
Rails, Traffic Control,NYSE,
Amazon, fortune 500, and
the list goes on……
Why Linux?
◦ Price – Free
◦ Ease – Not user friendly
◦ Reliability – runs for years
◦ Software – Mostly Enterprise level Software
◦ Multi Tasking – Best for Multi Tasking
◦ Security – Very Secure
◦ Open Source – Yes! Lot of distributions
◦ A must read https://blog.netdevgroup.com/2016/12/25-cool-linux-facts/
◦ Infrastructure
◦ Advertising Campaigns
◦ Company Registration process How Linux
◦ Security Deposits benefits me?
◦ Operating System Licensing Scenario: a startup
◦ Application Software Licensing company with a team of
10 members
Software auditing happens! Application Development
Web Development
Solution : somehow if we can replace Licensing cost, Data Analytics
that would add some benefit.
How? – Linux Operating System and Opensource Tools
Open-Source Vs. Licensed
What is Open-Source Licensed
◦ community developed operating ◦ Enterprise Versions
system ◦ Windows
◦ Kernel Programming ◦ Mac
◦ Contribute to the community
◦ Different Communities
Distributions:
https://www.linuxvmimages.com/
Distributions (distros)
Redhat Products
File System
◦ Linux treats everything as a file
◦ Every operating system stores data on Disk Drives using structures called a file system.
◦ The file system consists of files, directories and info needed to access and locate them
◦ Different types of file systems : EXT2, EXT3, XFS, windows: NTFS, FAT32
◦ Linux file system stores info in hierarchy of directories and files
• /boot : contains file that is used by the boot loader (grub.cfg)
• /root : root user home directory. It’s not the same as /
• /dev : System Devices
• /etc : Configuration files
• /bin: Everyday user commands
• /sbin: System or file system commands
• /opt: Optional add on apps
• /proc: Running processes (only exist in memory)
• /lib: C program library files needed by commands
• /tmp: directory for temporary files
• /home: directory for user
• /var: system logs
• /run: System daemons that run/ start very early to store tmp runtime files like PID files
• /mnt : to mount external file systems (Ex. NFS)
• /media: for CDROM Mounts
Kernel :
important
parts of kernel
• Process Management
• Memory Management
• Hardware Device
Drivers
• Filesystem drivers
• Network Management
• Various other bits and
pieces
Linux Vs Windows
Linux Windows
Price Free $$$$
Ease Not User Friendly User Friendly
Reliability Runs for years Often requires reboot
Software Mostly enterprise level SW Much larger selection of SW
Multi Tasking Best for multi tasking Available with High
CPU/Mem resource
Security Very Secure Somewhat secure (3rd party)
Open Source Open to Public Not an Opensource
Virtualization : Why virtualization?
Install OS on Hardware/ Bare – metal Host OS – Hypervisor – Linux OS
◦ Host OS : Windows 10
◦ Install Hypervisor : oracle virtualbox
◦ Install Linux OS
Should have decent amount of ram,
hdd and processor.
Performance impact,
Another solution : rely on cloud features
Dual Boot
Cloud Environment (AWS)
Amazon Web Services
◦ AWS Account
◦ Credit/Debit Card (Virtual Cards)
◦ 750 Hours access for 1 month (Free Tier)
◦ 3 Servers – for 1 hour (AWS counts it as 3 hours)
◦ Host OS – git bash
◦ Key Pair .pem
◦ SSH protocol – we are going to connect to server
in the cloud
◦ Ensure to shut down servers (stopped state)
◦ Do not share your credentials!
END OF SESSION 1