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

Linux Porting
Linux PortingLinux Porting
Linux PortingChamp Yen
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processTeja Bheemanapally
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux SystemJian-Hong Pan
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
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
 
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLinaro
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKBshimosawa
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and ToolsBrendan Gregg
 

Tendances (20)

Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
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
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
 
Linux Kernel Module - For NLKB
Linux Kernel Module - For NLKBLinux Kernel Module - For NLKB
Linux Kernel Module - For NLKB
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 

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
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 
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...
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
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)
 

Plus de 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
 
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
 
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

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Dernier (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

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?