Introduction To Linux
         Suresh Kalidasan
What is Linux

   A Unix-like Operating System

   A famous open source project
   Free to use, distribute, modify under a compatible licence
   Produced by a large developer and user community

   A combination of many projects
   Cost of commercial development estimated at USD 7 billion

   Companies often make money by selling:
       Support
       Training
       Custom changes
How Linux can help us ?

   Full operating system
   Works well on a variety of hardware, including older
      hardware
   You can adapt it to fit your needs
   Thousands of programs available
   Secure by design
   LAMP stack
   Supports a wide range of programming languages
   Scalable
History

   1965 - Bell Labs (AT&T), GE and MIT, Project to develop a new (multiuser, multitasking) operating
    system - MULTICS. (not successful)

   1969 - Ken Thompson and Dennis Ritchie implemented the first UNIX system for the PDP-7.

   1973 - The UNIX system was rewritten in the C programming language.

   1982 - University of California, Berkeley (UCB), Developed BSD UNIX because new commercial
    UNIX releases no longer included the source code.

   1984 - Richard Stallman started the GNU project to create a free operating system.

   1991 they created a lot of the tools but no kernel.

   Professor Andrew Tanenbaum wrote the operating system MINIX from scratch to teach his students
    the inner workings of a real operating system.

   1991 Apr - At age 21, Linus Torvalds starts working on a new operating system inspired by MINIX.

   1991 September - Linux version 0.01 is released.
Linux Application
Some Linux Flavors




   http://en.wikipedia.org/wiki/List_of_Linux_distributions
Linux vs Windows

                    Linux                                           Windows
Linux  was originally built by Linus Torvalds at   Firstversion of Windows – Windows 3.1
the University of Helsinki in 1991.                 released in 1992 by Microsoft.
Linux is a Unix-like, Kernel-based, fully          Windows is a GUI based operating system

memory-protected, multitasking operating            It has powerful networking capabilities, is
system                                              multitasking, and extremely user friendly
It runs on a wide range of hardware from PCs       Many beginner users find Windows easer to
to Macs.                                            use than other operating systems
Linux has been primary used by advanced            Windows is often known for a large amount of
computer users – programmers and developers         loop holes
Linux is more virus proof since viruses –          User Interface is well known for Windows
malicious programs either cannot be run
automatically on the Linux machine, or simply
are not capable of being executed on a 386
architecture
User Interface in latest flavors like Ubuntu is

comparatively equal
User Space vs Kernel Space

  User Space            Kernel Space
User space is the       Kernel Space us
memory area where all   strictly reserved for
user mode application   running the kernel (OS
work and this memory    background process),
can be swapped out      kernel extensions and
when necessary          most device drivers

User  space process    Linux  kernel space
normally runs in its    gives full access to the
own virtual memory      hardware, although
space and unless        some exceptions runs
explicitly requested,   in user space. (The
cannot access the       graphic system most
memory of other         people use with Linux
processes.              does not run in kernel
                        in contrast to that
                        found in Microsoft
                        Windows)
Kernel Types
What is a process ?

   Actual execution of passive collection of
    instructions

   Eg:
       Running Adobe acrobat reader
       Running word pad
       Running Printer application

   All the above are named as process in OS
    and this can be run parallel, methodology
    named as Multi-Tasking
What is Thread ?

   In Linux threads are initiated
    and executed inside a process
    (process specific area)

   Multiple threads can exist within
    the same process and share
    resource such as memory, while
    different process do not share
    these resource

   Eg: opening multiple instance
    of .pdf extension files in a adobe
    acrobat reader
Process/Threads state Diagram

                   Process gets
                    initiated from
                    Creation state and
                    ended with
                    terminated state,
                    depending on the
                    logic of program
                    other states are
                    valid
Boot Flow diagram
                 GRUB ( Grand Unified
                  Bootloader) is Multi-boot
                  boot loader
                 A Master Boot Record is a
                  512 bye boot sector that
                  is the first sector of a
                  partitioned data storage
                  such as hard disk
                 Root filesystem is the file
                  system that is contained
                  on the same partition on
                  which the root directory is
                  located.
Simplified Linux Kernel Diagram
Kernel map and connection flow
File system architecture
Detailed File system structure
Anatomy of Linux
Open Community Links

   Linux kernel availability
       http://www.kernel.org/
       http://www.linux.org/
   Linux Drivers
       http://www.linux-drivers.org/
   Grub
       http://www.gnu.org/software/grub/index.html
   File System
       http://www.busybox.net/
   Google will be your best friend
This Document Release date
S.No   Author      Release              Description
                   Version/Date

1      Suresh      v0.1 / 08 Dec 2010   Initial Version
       Kalidasan

Introduction to Linux

  • 1.
    Introduction To Linux Suresh Kalidasan
  • 2.
    What is Linux  A Unix-like Operating System  A famous open source project  Free to use, distribute, modify under a compatible licence  Produced by a large developer and user community  A combination of many projects  Cost of commercial development estimated at USD 7 billion  Companies often make money by selling:  Support  Training  Custom changes
  • 3.
    How Linux canhelp us ?  Full operating system  Works well on a variety of hardware, including older hardware  You can adapt it to fit your needs  Thousands of programs available  Secure by design  LAMP stack  Supports a wide range of programming languages  Scalable
  • 4.
    History  1965 - Bell Labs (AT&T), GE and MIT, Project to develop a new (multiuser, multitasking) operating system - MULTICS. (not successful)  1969 - Ken Thompson and Dennis Ritchie implemented the first UNIX system for the PDP-7.  1973 - The UNIX system was rewritten in the C programming language.  1982 - University of California, Berkeley (UCB), Developed BSD UNIX because new commercial UNIX releases no longer included the source code.  1984 - Richard Stallman started the GNU project to create a free operating system.  1991 they created a lot of the tools but no kernel.  Professor Andrew Tanenbaum wrote the operating system MINIX from scratch to teach his students the inner workings of a real operating system.  1991 Apr - At age 21, Linus Torvalds starts working on a new operating system inspired by MINIX.  1991 September - Linux version 0.01 is released.
  • 5.
  • 6.
    Some Linux Flavors http://en.wikipedia.org/wiki/List_of_Linux_distributions
  • 7.
    Linux vs Windows Linux Windows Linux was originally built by Linus Torvalds at Firstversion of Windows – Windows 3.1 the University of Helsinki in 1991. released in 1992 by Microsoft. Linux is a Unix-like, Kernel-based, fully Windows is a GUI based operating system memory-protected, multitasking operating It has powerful networking capabilities, is system multitasking, and extremely user friendly It runs on a wide range of hardware from PCs Many beginner users find Windows easer to to Macs. use than other operating systems Linux has been primary used by advanced Windows is often known for a large amount of computer users – programmers and developers loop holes Linux is more virus proof since viruses – User Interface is well known for Windows malicious programs either cannot be run automatically on the Linux machine, or simply are not capable of being executed on a 386 architecture User Interface in latest flavors like Ubuntu is comparatively equal
  • 8.
    User Space vsKernel Space User Space Kernel Space User space is the  Kernel Space us memory area where all strictly reserved for user mode application running the kernel (OS work and this memory background process), can be swapped out kernel extensions and when necessary most device drivers User space process Linux kernel space normally runs in its gives full access to the own virtual memory hardware, although space and unless some exceptions runs explicitly requested, in user space. (The cannot access the graphic system most memory of other people use with Linux processes. does not run in kernel in contrast to that found in Microsoft Windows)
  • 9.
  • 10.
    What is aprocess ?  Actual execution of passive collection of instructions  Eg:  Running Adobe acrobat reader  Running word pad  Running Printer application  All the above are named as process in OS and this can be run parallel, methodology named as Multi-Tasking
  • 11.
    What is Thread?  In Linux threads are initiated and executed inside a process (process specific area)  Multiple threads can exist within the same process and share resource such as memory, while different process do not share these resource  Eg: opening multiple instance of .pdf extension files in a adobe acrobat reader
  • 12.
    Process/Threads state Diagram  Process gets initiated from Creation state and ended with terminated state, depending on the logic of program other states are valid
  • 13.
    Boot Flow diagram  GRUB ( Grand Unified Bootloader) is Multi-boot boot loader  A Master Boot Record is a 512 bye boot sector that is the first sector of a partitioned data storage such as hard disk  Root filesystem is the file system that is contained on the same partition on which the root directory is located.
  • 14.
  • 15.
    Kernel map andconnection flow
  • 16.
  • 17.
  • 18.
  • 19.
    Open Community Links  Linux kernel availability  http://www.kernel.org/  http://www.linux.org/  Linux Drivers  http://www.linux-drivers.org/  Grub  http://www.gnu.org/software/grub/index.html  File System  http://www.busybox.net/  Google will be your best friend
  • 20.
    This Document Releasedate S.No Author Release Description Version/Date 1 Suresh v0.1 / 08 Dec 2010 Initial Version Kalidasan