SlideShare a Scribd company logo
1 of 32
© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Introduction to Linux
2© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
What to Expect?
Introduction to OS & OSS
Linux System Overview
Linux Usage Basics
3© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
OS Fundamentals
What is an OS?
Infinitely Running Program
Why do we need an OS?
Processor/Time Management
Memory Management
Storage Management
Network Management
I/O management
4© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Open Source Software
Fundamentals
Originally Free Software
Freedom to Run, Change and Redistribute
Licenses – GNU GPL (Code) and GNU FDL (Doc)
The Freedom provides openness
Hence, also referred as Open Source Software
Over time FS & OSS have differed
But still largely same
Latest Complete Definitions
FS: http://www.gnu.org/philosophy/free-sw.html
OSS: http://www.opensource.org/osd.html
5© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
OSS: Industry Advantage
Stable Software – Less Development Cycle
Whole Community Support
Time to Market
And most of all, today OSS provides almost a complete set
of software required for any kind of software development
Applications, GUIs, Utilities, … - All GPL or LGPL stuff
Languages – Whole set from the world :)
C Compiler – gcc & friends
Debuggers – gdb & friends
Profilers, Tracers, ...
and the list goes on
6© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
And finally the most important one
OS + OSS = Linux
7© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Why to choose OSS & Linux?
Quality and Reliability of Code
Availability of Code
Extensive Hardware Support
Communication Protocols and Software Standards
Available Tools
Community Support
Licensing
Vendor Independence
Cost
And, a wide range of Architecture Support
8© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux on Architectures
x86
Started with this
Mainly intended for PCs
Power PC
Intended for PC
Have become popular in embedded
Strong ARM
Faster CPU – Higher Performance
PDAs, Setup box etc.
ARM
Suits well for Embedded
Include THUMB – reduce code bandwidth
High density code than PPC, x86
Many More
Alpha, H8, MIPS, Sparc, SuperH, ...
9© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux System Overview
10© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
The Complete Software System
Operating System
“Kernel Space”
OS Services
Applications
“User Space”
Hardware
11© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Kernel Subsystem
The Process Scheduler (SCHED)
The Memory Manager (MM)
The Virtual File System (VFS)
The Network Interface (NET)
The Input/Output System (IO)
Additionally,
the Inter-Process Communication (IPC)
12© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux OS Services
System Call Interface
X Window System
13© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Applications
Shell
Terminal / Console
Window Manager
Editor
Compiler
...
14© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Usage Basics
15© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Topics
Root & System Directories
Shell Basics & the 'bash' Shell
File Basics & related Commands
User Basics & related Commands
File Access Permissions
System & Help Information
Standard I/O, Redirection and Pipes
16© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
/
the Root of an inverted tree
The top-most or super-parent directory
The container of your computer
Type: ls /
17© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
System Directories
/bin, /sbin - system binaries/applications
/var - logs, mails
/proc, /sys - “virtual” windows into the kernel
/etc - configuration files
/lib - shared system libraries
/dev - device files
/boot - Linux kernel and boot related binary files
/opt - for third-party packages
/root, /home - home directory for super user & other users
/usr - user space related files and dirs (binaries, libraries, ...)
/tmp - scratch pad
/mnt - mount points
18© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Shell Basics
What is a Shell?
Various types of Shells
Bourne Shell (sh)
C Shell (csh)
Korn Shell (ksh)
Bourne Again Shell (bash)
TENEX csh (tcsh)
Z Shell (zsh)
Busybox (busybox) – Embedded Systems
19© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Bourne Again SHell
env - shell environment variables
export [var_name] - export a shell variable
HOME - path to user’s home directory
PATH - executable search path
PWD - present user directory
PS1 - command prompt
which - shows executable path
history - command recall
20© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Bourne Again SHell ...
alias - create shortcuts to commands
file - shows the information about a file
type - shows information about a command
Scripts
/etc/profile - System wide startup script
~/.bash_profile – User specific startup script
~/.bashrc – Shell specific startup script
~/.bash_logout – User specific shutdown script
21© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
File Basics
Every thing is viewed as a file in Linux
A file under the /
Seven Types
Regular (-)
Directory (d)
Character Device (c)
Block Device (b)
Named Pipe (p)
Socket (s)
Symbolic Link (l)
22© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
File related Shell Commands
ls - list directory/file contents
cd - change directory
pwd - print working directory
df - disk free
du - disk usage
cp - copy
mv - move, rename
rm – remove
mkdir - make directory
rmdir - remove directory
cat, less, head, tail - used to
view text files
vi, vim - editors
touch - create and update
files
grep - search in files
find, locate - search for files
gzip, gunzip, bzip2, bunzip2,
xz, unxz - compression
tar - archive
sed, awk - file manipulation
23© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
User Basics
All Accesses into a Linux System are through a
User with a Password
Super User – root
Normal Users - <user_name>
Files: /etc/passwd, /etc/shadow
Users can be categorized into groups
root, bin, sys, adm, …
File: /etc/group
24© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
User related Shell Commands
useradd - create user
userdel - delete user
usermod - modify user
su - <username> - start new shell as different
user
finger - user information lookup
passwd - change or create user password
who, w, user - to find out who is logged in
25© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
User & File Access
All Files have User specific ownerships & access
permissions
Type: ls -l
–rw–r––r––
Symbol Name Number Position
r read 4 r--
w write 2 -w-
x execute 1 --x
type user group other
user (anil) group (anil)
26© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Related Shell Commands
chmod – Change file permissions
chown – Change file owner
chgrp – Change file group
27© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Few “Help”ful Shell Commands
uname - print system information
man <topic> - manual pages
info <topic> - information pages
28© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Manuals
Divided into sections
1 Shell commands e.g. mv, ls, cat
2 System calls e.g. _exit, read, write
3 Library calls e.g. exit, printf
4 Device and network specific info e.g. mouse, ttyS, null
5 File formats e.g. passwd, termcap
6 Games and demos e.g. fortune, worms
7 Miscellaneous e.g. ascii, fifo, pthreads
8 Administrative commands e.g. fsck, network daemons
9 POSIX Programmer Manual
Info pages are also available
29© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Standard Input & Outputs
Standard Input – 0 (default: keyboard)
Standard Output – 1 (default: monitor)
Standard Error – 2 (default: monitor)
Examples
read
echo
q
30© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Redirections & Pipes
command < file - reads standard input from file
command > file - directs standard output to file
command >> file - appends standard output to file
command 2> file - directs standard error to file
command 2>> file - appends standard error to file
command > file 2>&1 - both standard output &
error to file
cmd1 | cmd2 - transfer o/p of cmd1 as i/p to cmd2
31© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
What all have we learnt?
Introduction to OS & OSS
Linux System Overview
The 3 software layers
The hardware core
Linux Usage Basics
Root & System Directories
Shell, File, User Basics
System & Help Information
Standard I/O, Redirection and Pipes
32© 2010-15 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Any Queries?

More Related Content

What's hot

Linux Locking Mechanisms
Linux Locking MechanismsLinux Locking Mechanisms
Linux Locking MechanismsKernel TLV
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and outputMythiliA5
 
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)William Liang
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM SystemsXPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM SystemsThe Linux Foundation
 

What's hot (20)

Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Board Bringup
Board BringupBoard Bringup
Board Bringup
 
Processes
ProcessesProcesses
Processes
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Linux Locking Mechanisms
Linux Locking MechanismsLinux Locking Mechanisms
Linux Locking Mechanisms
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
linux file sysytem& input and output
linux file sysytem& input and outputlinux file sysytem& input and output
linux file sysytem& input and output
 
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
An introduction to the linux kernel and device drivers (NTU CSIE 2016.03)
 
Linux Internals - Part III
Linux Internals - Part IIILinux Internals - Part III
Linux Internals - Part III
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM SystemsXPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 

Similar to Introduction to Linux (20)

Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
Linux System
Linux SystemLinux System
Linux System
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
File Systems
File SystemsFile Systems
File Systems
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
operating system
operating systemoperating system
operating system
 
Basic orientation to Linux
Basic orientation to LinuxBasic orientation to Linux
Basic orientation to Linux
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
Centos
CentosCentos
Centos
 
System Calls
System CallsSystem Calls
System Calls
 
Linux Internals Part - 1
Linux Internals Part - 1Linux Internals Part - 1
Linux Internals Part - 1
 
Linux Workshop , Day 3
Linux Workshop , Day 3Linux Workshop , Day 3
Linux Workshop , Day 3
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
 

More from Anil Kumar Pugalia (20)

Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Processes
ProcessesProcesses
Processes
 
System Calls
System CallsSystem Calls
System Calls
 
Embedded C
Embedded CEmbedded C
Embedded C
 
Playing with R L C Circuits
Playing with R L C CircuitsPlaying with R L C Circuits
Playing with R L C Circuits
 
Audio Drivers
Audio DriversAudio Drivers
Audio Drivers
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux Drivers
 
References
ReferencesReferences
References
 
Functional Programming with LISP
Functional Programming with LISPFunctional Programming with LISP
Functional Programming with LISP
 
Power of vi
Power of viPower of vi
Power of vi
 
gcc and friends
gcc and friendsgcc and friends
gcc and friends
 
"make" system
"make" system"make" system
"make" system
 
Hardware Design for Software Hackers
Hardware Design for Software HackersHardware Design for Software Hackers
Hardware Design for Software Hackers
 
RPM Building
RPM BuildingRPM Building
RPM Building
 
Linux User Space Debugging & Profiling
Linux User Space Debugging & ProfilingLinux User Space Debugging & Profiling
Linux User Space Debugging & Profiling
 
Linux Network Management
Linux Network ManagementLinux Network Management
Linux Network Management
 
Timers
TimersTimers
Timers
 
Threads
ThreadsThreads
Threads
 
Synchronization
SynchronizationSynchronization
Synchronization
 

Recently uploaded

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Introduction to Linux

  • 1. © 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Introduction to Linux
  • 2. 2© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. What to Expect? Introduction to OS & OSS Linux System Overview Linux Usage Basics
  • 3. 3© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. OS Fundamentals What is an OS? Infinitely Running Program Why do we need an OS? Processor/Time Management Memory Management Storage Management Network Management I/O management
  • 4. 4© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Open Source Software Fundamentals Originally Free Software Freedom to Run, Change and Redistribute Licenses – GNU GPL (Code) and GNU FDL (Doc) The Freedom provides openness Hence, also referred as Open Source Software Over time FS & OSS have differed But still largely same Latest Complete Definitions FS: http://www.gnu.org/philosophy/free-sw.html OSS: http://www.opensource.org/osd.html
  • 5. 5© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. OSS: Industry Advantage Stable Software – Less Development Cycle Whole Community Support Time to Market And most of all, today OSS provides almost a complete set of software required for any kind of software development Applications, GUIs, Utilities, … - All GPL or LGPL stuff Languages – Whole set from the world :) C Compiler – gcc & friends Debuggers – gdb & friends Profilers, Tracers, ... and the list goes on
  • 6. 6© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. And finally the most important one OS + OSS = Linux
  • 7. 7© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Why to choose OSS & Linux? Quality and Reliability of Code Availability of Code Extensive Hardware Support Communication Protocols and Software Standards Available Tools Community Support Licensing Vendor Independence Cost And, a wide range of Architecture Support
  • 8. 8© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux on Architectures x86 Started with this Mainly intended for PCs Power PC Intended for PC Have become popular in embedded Strong ARM Faster CPU – Higher Performance PDAs, Setup box etc. ARM Suits well for Embedded Include THUMB – reduce code bandwidth High density code than PPC, x86 Many More Alpha, H8, MIPS, Sparc, SuperH, ...
  • 9. 9© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux System Overview
  • 10. 10© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. The Complete Software System Operating System “Kernel Space” OS Services Applications “User Space” Hardware
  • 11. 11© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Kernel Subsystem The Process Scheduler (SCHED) The Memory Manager (MM) The Virtual File System (VFS) The Network Interface (NET) The Input/Output System (IO) Additionally, the Inter-Process Communication (IPC)
  • 12. 12© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux OS Services System Call Interface X Window System
  • 13. 13© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Applications Shell Terminal / Console Window Manager Editor Compiler ...
  • 14. 14© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Usage Basics
  • 15. 15© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Topics Root & System Directories Shell Basics & the 'bash' Shell File Basics & related Commands User Basics & related Commands File Access Permissions System & Help Information Standard I/O, Redirection and Pipes
  • 16. 16© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. / the Root of an inverted tree The top-most or super-parent directory The container of your computer Type: ls /
  • 17. 17© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. System Directories /bin, /sbin - system binaries/applications /var - logs, mails /proc, /sys - “virtual” windows into the kernel /etc - configuration files /lib - shared system libraries /dev - device files /boot - Linux kernel and boot related binary files /opt - for third-party packages /root, /home - home directory for super user & other users /usr - user space related files and dirs (binaries, libraries, ...) /tmp - scratch pad /mnt - mount points
  • 18. 18© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Shell Basics What is a Shell? Various types of Shells Bourne Shell (sh) C Shell (csh) Korn Shell (ksh) Bourne Again Shell (bash) TENEX csh (tcsh) Z Shell (zsh) Busybox (busybox) – Embedded Systems
  • 19. 19© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Bourne Again SHell env - shell environment variables export [var_name] - export a shell variable HOME - path to user’s home directory PATH - executable search path PWD - present user directory PS1 - command prompt which - shows executable path history - command recall
  • 20. 20© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Bourne Again SHell ... alias - create shortcuts to commands file - shows the information about a file type - shows information about a command Scripts /etc/profile - System wide startup script ~/.bash_profile – User specific startup script ~/.bashrc – Shell specific startup script ~/.bash_logout – User specific shutdown script
  • 21. 21© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. File Basics Every thing is viewed as a file in Linux A file under the / Seven Types Regular (-) Directory (d) Character Device (c) Block Device (b) Named Pipe (p) Socket (s) Symbolic Link (l)
  • 22. 22© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. File related Shell Commands ls - list directory/file contents cd - change directory pwd - print working directory df - disk free du - disk usage cp - copy mv - move, rename rm – remove mkdir - make directory rmdir - remove directory cat, less, head, tail - used to view text files vi, vim - editors touch - create and update files grep - search in files find, locate - search for files gzip, gunzip, bzip2, bunzip2, xz, unxz - compression tar - archive sed, awk - file manipulation
  • 23. 23© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. User Basics All Accesses into a Linux System are through a User with a Password Super User – root Normal Users - <user_name> Files: /etc/passwd, /etc/shadow Users can be categorized into groups root, bin, sys, adm, … File: /etc/group
  • 24. 24© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. User related Shell Commands useradd - create user userdel - delete user usermod - modify user su - <username> - start new shell as different user finger - user information lookup passwd - change or create user password who, w, user - to find out who is logged in
  • 25. 25© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. User & File Access All Files have User specific ownerships & access permissions Type: ls -l –rw–r––r–– Symbol Name Number Position r read 4 r-- w write 2 -w- x execute 1 --x type user group other user (anil) group (anil)
  • 26. 26© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Related Shell Commands chmod – Change file permissions chown – Change file owner chgrp – Change file group
  • 27. 27© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Few “Help”ful Shell Commands uname - print system information man <topic> - manual pages info <topic> - information pages
  • 28. 28© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Manuals Divided into sections 1 Shell commands e.g. mv, ls, cat 2 System calls e.g. _exit, read, write 3 Library calls e.g. exit, printf 4 Device and network specific info e.g. mouse, ttyS, null 5 File formats e.g. passwd, termcap 6 Games and demos e.g. fortune, worms 7 Miscellaneous e.g. ascii, fifo, pthreads 8 Administrative commands e.g. fsck, network daemons 9 POSIX Programmer Manual Info pages are also available
  • 29. 29© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Standard Input & Outputs Standard Input – 0 (default: keyboard) Standard Output – 1 (default: monitor) Standard Error – 2 (default: monitor) Examples read echo q
  • 30. 30© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Redirections & Pipes command < file - reads standard input from file command > file - directs standard output to file command >> file - appends standard output to file command 2> file - directs standard error to file command 2>> file - appends standard error to file command > file 2>&1 - both standard output & error to file cmd1 | cmd2 - transfer o/p of cmd1 as i/p to cmd2
  • 31. 31© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. What all have we learnt? Introduction to OS & OSS Linux System Overview The 3 software layers The hardware core Linux Usage Basics Root & System Directories Shell, File, User Basics System & Help Information Standard I/O, Redirection and Pipes
  • 32. 32© 2010-15 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Any Queries?