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 (20)

BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Process scheduling linux
Process scheduling linuxProcess scheduling linux
Process scheduling linux
 
Linux scheduling and input and output
Linux scheduling and input and outputLinux scheduling and input and output
Linux scheduling and input and output
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
 
Toolchain
ToolchainToolchain
Toolchain
 
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 systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
linux device driver
linux device driverlinux device driver
linux device driver
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
Linux process management
Linux process managementLinux process management
Linux process management
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 

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)
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 

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

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
🐬 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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
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
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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...
 

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?