SlideShare une entreprise Scribd logo
1  sur  33
© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Introduction to Linux
2© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
What to Expect?
Introduction to OS & OSS
Linux System Overview
Linux Usage Basics
3© 2010-19 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-19 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-19 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-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
And finally the most important one
OS + OSS = Linux
7© 2010-19 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-19 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-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux System Overview
10© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
The Complete Software System
Operating System
“Kernel Space”
OS Services
Applications
“User Space”
Hardw
are
11© 2010-19 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-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Kernel Subsystem ...
Process
Scheduler
Memory
Manager
IPC
Network
VFS
13© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux OS Services
System Call Interface
X Window System
14© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Applications
Shell
Terminal / Console
Window Manager
Editor
Compiler
...
15© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Linux Usage Basics
16© 2010-19 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
17© 2010-19 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 /
18© 2010-19 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
19© 2010-19 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
20© 2010-19 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
21© 2010-19 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
22© 2010-19 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)
23© 2010-19 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
24© 2010-19 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
25© 2010-19 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
26© 2010-19 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)
27© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Related Shell Commands
chmod – Change file permissions
chown – Change file owner
chgrp – Change file group
28© 2010-19 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
29© 2010-19 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
30© 2010-19 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
31© 2010-19 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
32© 2010-19 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
33© 2010-19 SysPlay Workshops <workshop@sysplay.in
All Rights Reserved.
Any Queries?

Contenu connexe

Tendances

Getting Started with Buildroot
Getting Started with BuildrootGetting Started with Buildroot
Getting Started with BuildrootTrevor Woerner
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Ahmed El-Arabawy
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Ahmed El-Arabawy
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O YourHelper1
 
Linux process management
Linux process managementLinux process management
Linux process managementRaghu nath
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
Linux Porting
Linux PortingLinux Porting
Linux PortingChamp Yen
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareLinaro
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 

Tendances (20)

Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Getting Started with Buildroot
Getting Started with BuildrootGetting Started with Buildroot
Getting Started with Buildroot
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Linux System Programming - File I/O
Linux System Programming - File I/O Linux System Programming - File I/O
Linux System Programming - File I/O
 
Linux process management
Linux process managementLinux process management
Linux process management
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Programming
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 

Similaire à Introduction to Linux (20)

Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
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
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
File Systems
File SystemsFile Systems
File Systems
 
operating system
operating systemoperating system
operating system
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
Basic orientation to Linux
Basic orientation to LinuxBasic orientation to Linux
Basic orientation to Linux
 
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...
 
System Calls
System CallsSystem Calls
System Calls
 
Linux Internals Part - 1
Linux Internals Part - 1Linux Internals Part - 1
Linux Internals Part - 1
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
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)
 
System Calls
System CallsSystem Calls
System Calls
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in Hyderabad
 

Plus de Anil Kumar Pugalia (20)

Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Processes
ProcessesProcesses
Processes
 
Embedded C
Embedded CEmbedded C
Embedded C
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
 
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
 

Dernier

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Introduction to Linux

  • 1. © 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Introduction to Linux
  • 2. 2© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. What to Expect? Introduction to OS & OSS Linux System Overview Linux Usage Basics
  • 3. 3© 2010-19 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-19 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-19 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-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. And finally the most important one OS + OSS = Linux
  • 7. 7© 2010-19 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-19 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-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux System Overview
  • 10. 10© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. The Complete Software System Operating System “Kernel Space” OS Services Applications “User Space” Hardw are
  • 11. 11© 2010-19 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-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Kernel Subsystem ... Process Scheduler Memory Manager IPC Network VFS
  • 13. 13© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux OS Services System Call Interface X Window System
  • 14. 14© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Applications Shell Terminal / Console Window Manager Editor Compiler ...
  • 15. 15© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Linux Usage Basics
  • 16. 16© 2010-19 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
  • 17. 17© 2010-19 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 /
  • 18. 18© 2010-19 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
  • 19. 19© 2010-19 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
  • 20. 20© 2010-19 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
  • 21. 21© 2010-19 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
  • 22. 22© 2010-19 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)
  • 23. 23© 2010-19 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
  • 24. 24© 2010-19 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
  • 25. 25© 2010-19 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
  • 26. 26© 2010-19 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)
  • 27. 27© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Related Shell Commands chmod – Change file permissions chown – Change file owner chgrp – Change file group
  • 28. 28© 2010-19 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
  • 29. 29© 2010-19 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
  • 30. 30© 2010-19 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
  • 31. 31© 2010-19 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
  • 32. 32© 2010-19 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
  • 33. 33© 2010-19 SysPlay Workshops <workshop@sysplay.in All Rights Reserved. Any Queries?