Unit 1
Unit 1
HISTORY OF LINUX
A popularopen-sourceoperating system is Linux.Itwas initiallycreated by
LinusTorvalds in 1991.At the time,Torvaldswwas acomputer sciencestudent
atthe University
of Helsinki,
Finlandand began workingon the Linuxprojectas
a personalendeavour.The name Linuxisa combination of hisfirst
name, Linus,
and Unix,the operating system that inspiredhis projects.
At the time, most
operating systemswere proprietaryand expensive.Torvalds wanted to create
an operatingsystem that was freelyavailable
to anyone who wanted to use the
operating system,
He originally
releasedLinux as freesoftwareunderthe GNU
General Public License.This meant that anyone could
use, modify, and
redistribute
hissourcecode.
Introduction to LinuxOperatingSystem
• Linuxisa community ofopen-source
Unix likeoperating
systemsthatare
based on the LinuxKernel.
Itwas initially
released
by LinusTorvalds
on
Deptember 17, 1991. Itis afreeand open-source operatingsystem and the
SOurce code can be modifiedanddistributed to anyone commerciallyOr
noncommercially under the GNU GeneralPublicLicense.
Linuxwas createdforpersonal
Initially, computersand gradually itwas used
In othermachines like servers, mainframe computers,supercomputers,etC.
Nowadays,Linuxisalsoused inembedded systemslike routers,
automation
controls,televisions,digitalvideo recorders,
videogame consoles,
smartwatches,
etc.
system)itisbased on the
The biggestsuccessof LinuxisAndroid(operating
Linux kernel Due to android
thatisrunningon smartphonesand tablets.
Linuxhas the largest base ofall
installed general-purposeoperatingsystems.
Linuxisgenerallypackaged ina Linuxdistribution.
Architecture
of Linux
Linuxarchitecture
has thefollowing
components:
1.Kernel:Kernelisthe coreofthe Linuxbased operatingsystem.It
virtualizesthe common hardware resources ofthe computer to provide
each processwith itsvirtualresources.Thismakes the processseem as if
itisthe soleprocessrunningon the machine.The kernel isalso
responsible forpreventingand mitigatingconflictsbetween different
processes.Differenttypes ofthe kernelare:
MonolithicKernel- isan operating system architecturewhere
the entireoperatingsystem isworkinginkernel space.
Microkernels- the near-minimum amount of softwarethat
can providethe mechanisms needed to implement an operating
system (OS).These mechanisms include low-level address
space management, thread management, and inter-process
communication (PC).
Hybridkernels- one thatcombines aspectsof both micro
and monolithickernels
Exo kernels- Itallocates
physical
resourcesto applications.
2. System Library: Isthe specialtypesoffunctionsthat areused to
implement the functionalityoftheoperatingsystem.
3.Shell:Itisan interfaceto the kernel
which hidesthe complexityofthe
kernel's
functionsfrom the users.Ittakescommands fromthe userand
executesthe kernel'sfunctions.
4. HardwareLayer: all
Thislayerconsists peripheral
deviceslike
RAM/
HDD/ CPU etc.
5.System Utility:
Itprovidesthe functionalities
ofan operatingsystem to
the user.
Applications
Shell
Kernel
Hardware
Utilities
Advantages of Linux
OS upgrades
Hardware driverinstallation
Input method installation
Respond toapplication queriesfor software(apps,
codecs,languages)
and metered connections
Offline
OS updates end of life
App end of life
Non-goals
X Window System
The X Window System (X11,or simplyX) is a windowing systemforbitmap displays,
common on Unix-likeoperatingsystems.
• X providesthe basicframework fora GUl environment: drawing and moving windowS on the
displaydeviceand interactingwitha mouse and keyboard.
Xdoes not mandate the userinterface– thisishandled by individualprograms.As such,the
visual ofX-basedenvironments
styling variesgreatly; diferent
programsmay presentradically
interfaces.
different
• X originatedas part of ProjectAthena Massachusetts Institute
at of Technology(MIT)in
1984.)The X protocol has been version11(hence"X11") since September 1987
The X.Org Foundationleadsthe X project, with the currentreference implementation,
X.Org
Server,available as freeand open-source softwareunder the MIT Licenseand similar
permissivelicenses.
KD cer
a Kind
Softwarearchitecture
User's
workstation
KeyboardMouse Screen
X Server
X client X client
(browser) (xterm)
Network
X client
enablesene
adwae B) cefoethat
(xterm)
an applicationdisplaying
to a window of another display
system
a system program controlling
the videooutput of a PC
a dedicatedpieceof hardware
Thisclient-server -
terminology the user'sterminalbeingthe
-
clients oftenconfusesnew X users, serverand the applications
becausethe termsappear reversed. But X takesthe
beingthe
perspectiveofthe application,ratherthan thatofthe end-user:
to applications, X providesdisplay and \/O services
so itisa server;applicationsuse these services,thus they areclients.
The communicationprotocol
between serverand clientoperates
and servermay run on the same machine network-transparently: the client
oron differentones,possibly with different
and operatingsystems. client and servercan even communicate architectures
A
tunneling securelyoverthe Internet by
the connection overan encryptednetwork session.
An X clientitselfmay emulatean X server by providing displayservices to otherclients.
known as"Xnesting" Open-source Thisis
clientssuch as Xnestand Xephyr supportsuch X
nesting.
hast derre
Origins
MatthiasEttrich.
founderof KDE
The KDE Marketing Team announced a rebrandingof the KDE project components
on 24
November 2009. Motivated by the perceived shiftinobjectives, the rebrandingfocused on
emphasizing both the community of software
creatorsand the varioustoolssuppliedby the KDE,
ratherthanjustthe desktopenvironment.
14 October
1996 KDE developmentannounced9]
K Desktop
Environment1 12 July 1998
K
Desktop 23 October
Environment2 2000
K Desktop
Environment3 3 April2002
VIEditing
commands
Note:You shouldbe inthe "command mode" to
executethesecommands. VI
editoriscase-sensitiveso make sureyou type the commands inthe
rightletter
case.
Operation
Modes
Whileworkingwith the vi
editor,
we usually
come acrossthe following
two modes -
Command mode - Thismode enables youto perform
administrative
tasks
such as saving the files,executing the commands, moving the cursor,
cutting(yanking)and pastingthe linesor words,
as wellas findingand
replacing.Inthismode, whatever youtype is
as a command.
interpreted
Insert mode- Thismode enablesyou to inserttextintothe
file.
Everything
that's
typed inthismode is interpretedas inputand placedinthe file.
vi
alwaysstartsinthe command mode. To entertext, you must be inthe insert
mode for
which simply type i.To come out of the insert
mode, pressthe Esc key,which willtake
you back to the command mode.
Summary ofBasic,.
Commands
The following
tabledescribesbasicvicommands.
vi
Starting
Command
Description
vi
filename Open orcreatefile
vi
Open new file
to be named later
Com mand Deseription
Command Description
e
Move to end ofcurrentwor
M Move to middleofscreen
Ctrl-D Scroll
forwardone-half
screen
Ctrl-U Scroll
backward one-halfscreen
Inserting
Characters
and Lines
Command Description
a to rightofcursor
Insertcharacters
A at end ofline
Insertcharacters
to leftofcursor
Insertcharacters
I at beginningof line
Insertcharacters
Insertlinebelow cursor
Insertlineabove cursor
ChangingText
Command Description
cC Change line
S Substitute
stringforcharacter(s)
from cursorforward
rReturn Breakline
Joincurrentlineand linebelow
Command Description
to right
character
Transposecharacterat cursorand
Undo previouscommand
U Undo all
changesto currentline
Undo previouslast-line
command
DeletingText
Command
Description
Deletecharacteratthe cursor
dw
Delete word(orpartofword to rightofcursor)
dd Deletelinecontaining
the cursor
D Deletepartoflinetorightofcursor
:5,10
d Deletelines5-10
Command Description
yy Yank or copyline
Putyanked or deletedlinebelowcurrentline
Command
Description
P
Put yanked ordeletedlineabove
currentline
SettingLineNumbers
Command Description
Setting
Case-sensitivity
Command Description
Findinga Line
Command Description
Go tolastlineof file
1G lineoffile
Go to first
21G Go to 21
line
Searchingand Replacing
Command Description
Istring Searchforstring
ofstring
Find nexXt occurrence insearchdirection
Com mand Deseription
N in search direction
Find previousoccurrenceofstring
Clearing
the Screen
Command Deseription
Ctrl-L Clear(refresh)
scrambledscreen
aFile
Inserting Intoa File
Command Description
rfilename Insert(read)
file
aftercursor
Savingand Quitting
:W Save changes(writebuffer)