0% found this document useful (0 votes)
16 views

Unit 1

Uploaded by

rohannegi10ep
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Unit 1

Uploaded by

rohannegi10ep
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

/ UNIT-I

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.

Earlyversionsof Linuxwere primarily


used by technologyenthusiasts
and
software developers,but over time ithas grovwn in popularity
and is used in
varioustypes of devicessuch as servers,smartphones,and embedded systems.
Linux is consideredone of the most stable,secure and reliable
operating
systems and is widely used in servers,supercomputers and
enterprise
environments.Today, Linuxisone of the most widelyused
operatingsystems
inthe world,with an estimated2.76% of all desktop computersand more than
90% of the world's top supercomputersrunningon Linux,and approx.71.85%
of allmobile devices run on Android, which is,Linux-based.
The Linux
community has expanded to includethousands of developers and userswho
work on the creation and upkeep of the operatingsystem.Nowadays Linux
has
many distributions
(versions)namely:
1.Ubuntu
2. Fedora
3. Arch
4. Plasma
5. KDE
6. Mint
7. Manjaro

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

The main advantage of Linux,isitisan open-source


operating system.
Thismeans the sourcecode iseasilyavailable
foreveryoneand you are
allowedto contribute,modify and distribute
thecode to anyone without
any permissions.
Interms of security,
Linuxismore securethanany otheroperating
system.Itdoes not mean thatLinuxis100 percentsecureithas some
So,
thanany otheroperatingsystem.
malware foritbut islessvulnerable
itdoes not requireany anti-virus software.
The softwareupdates inLinux are easy and frequent.
are available so thatyou can usethem
VariousLinuxdistributions
to your taste.
accordingto your requirementsoraccording
Linuxisfreely availableto use on the internet.
Ithas largecommunity support.
Itrarely slowsdown or freezes and thereisno
It provideshighstability.
need to rebootitaftera shorttime.
Itmaintainthe privacyofthe user.
The performanceofthe Linuxsystem ismuch higherthan otheroperating
systems. Itallows to
a largenumber of people work at the same time and
ithandlesthem efficiently.
Itisnetwork friendly.
The flexibilityof Linuxishigh. There isno need to install a complete Linux
suit; you areallowedto install onlyrequiredcomponents.
Linuxiscompatiblewitha largenumber of file formats.
Itisfastand easy toinstall from the web.Itcan alsoinstall on any
hardware even on youroldcomputer system.
It performsall tasksproperly even ifithas limitedspaceon the hard disk.
Disadvantages
of Linux
It
isnot very user-friendly.
So, itmay be confusingforbeginners.
• Ithas smallperipheralhardware driversas compared to windows.

GNOME Software(GNU Network ObjectModel Environment)


GNU isthe Free SoftwareFoundationsown operatingsystem and
setof
applications.
GNOME Softwareisa utilityforinstalling
applications
and updateson Linux.Itispartof
the GNOME CoreApplications,
and was introducedinGNOME 3.10.
It
isthe GNOME front-endto the Package Kit,inturn a front-end
to several
package management
systems basedon both RPM and DEB.
systems,which include
Rçel tHat lacletmaye
are pe
The goalsand use cases that GNOME Softwarermemmatey
targetsas of November 2020
Primarygoals
V Deb fle Debiam
Allowpeopleto find apps by browsingorsearch:
a specificapp thatthey'relookingfor,or
floaatrlenser
apps in a particular
category,orwith particular
functionality
thatthey require
Allow peopleto effectively
inspectand appraise apps beforethey install
them
(screenshots, descriptions,
ratings,
comments, metadata)
Allowpeopleto view which apps areinstalledand remove them
Presenta positiveview ofthe app ecosystem
Reinforcethe sensethat thereare lotsof highquality
apps
Encourage peopleto engage with that ecosystem,both as usersand as
contributors
When browsing,presentand promote the best apps thatare available
Facilitate
accidental
discoveryof greatapps
Handle softwareupdates.Make softwareupdatesas little work forusersas possible. To
include: eos,rpm-ostree),
apps, OS updates (PackageKit, firmware
Support multiplesoftwarerepositories,
defined by both the and users.
distributor
Show which reposareconfigured. Allowthem to be added/removed.
Handle caseswhere the same app can be installed from multiplesources.
Secondary goals

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

Not a package manager front-end


Not all
repos areequal
Not all
apps areequal

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

X Window System protocols and X Window System core


and architecture protoco

User's
workstation
KeyboardMouse Screen

X Server

X client X client
(browser) (xterm)

Network

X client
enablesene
adwae B) cefoethat
(xterm)

Remote machine kost)to


Calledthe
keha anotw
Simple example:the X server
receives)input
from a localkeyboardand mouse and displays
screen.A web browser and to a
a(terminal emulatorrun on the user'sworkstation
emulatorrunson a remote computer but is and a terminal
controlled
and monitoredfrom the user's
machine
X usesa client-server
model: an X servercommunicateswith
accepts requests variousclientprograms.The server
for graphical
output (windows)and sendsback user
or touchscreen).
The servermay functionas: input(from keyboard,mouse,

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

Coesot ). manages toncbus


Xnust-is a cient o ealdever whek
behay
KDE isan international
freesoftwarecommunity that developsfreeand open-sourcesoftware.
As
development hub, it providestoolsand resourcesthat allow
a central collaborative
work on this
kind of software. Well-known products include the Plasma Desktop (the defaultdesktop
environmenton many Linux distributions), KDE Frameworks, and range ofcrosS
platformapplications such as Amarok,digiKam, and
Kritathat are designed to run
onUnix and Unix-like
operatingsystems,Microsoft
Windows, and Android.

Origins
MatthiasEttrich.
founderof KDE

KDE was founded in 1996 by MatthiasEtrich, of Tübingen.At the


a student at the University
time,he was troubledby certainaspects of the Unix desktop.Among hisconcernswas that none
ofthe applicationslookedor behaved alike. Inhisopinion, desktopapplications ofthe time were
too complicatedforend users.In orderto solvethe issue,he proposed the creationof a desktop
environment in which userscould expect the applications tobe consistentand easy to use.His
initial
Usenetpostspurredsignificant interest,and the KDE projectwas born.
The name KDE was intended as a wordplay on the existingCommon Desktop Environment,
availableforUnix systems.CDE was an X11-baseduser environment jointly developed by HP,
IBM,and Sun through the X/Open consortium, with an interfaceand productivitytoolsbased on
the Motifgraphicalwidget toolkit.Itwas supposed to be an intuitively easy-to-usedesktop
computer environment. The K was originallysuggested to stand for"Kool", but itwas quickly
decidedthatthe K should standfornothingin particular.
Therefore, the KDE initialism
expanded
to "K Desktop Environment"before it was dropped altogetherin favorof simplyKDE in a
rebrandingeffort

Inthe beginningMatthiasEttrichchose to use Trolltech'sQt frameworkforthe KDE projeetOther


programmers quicklystarted developingKDE/Qt applications, and by early 1997, a few
applicationswere being released.On l2July 1998 the first versionof the desktop environment,
called KDE 1.0,was released. The originalGPL licensedversionof thistoolkit only existedfor
platformswhichused the X1l displayserver, but with the releaseofQt4, LGPL licensed versions
are available
formore platforms. ThisallowedKDE softwarebased on Qt 4 or newer versionsto
theoretically to MicrosoftWindows and OS X.
be distributed

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.

What was previouslyknown as KDE 4 was splitintoKDE Plasma Workspaces,KDE


Applications,and KDE Platform(now KDE Frameworks) bundled as KDE SoftwareCompilation
4.5 Since 2009, the name KDE no longer stands forK Desktop
Evironment,but for the
community thatproduces the software9)
Softwarereleases

Version Date Information

14 October
1996 KDE developmentannounced9]

K Desktop
Environment1 12 July 1998

K
Desktop 23 October
Environment2 2000

K Desktop
Environment3 3 April2002

KDE Software 11 January


Compilation
4 2008

KDE Plasma 5 formerKDE/KDE SC


15July 2014 split
intoKDE Plasma,
Frameworks and KDE KDE
Applications
DIFFERENT TYPES OF EDITORS

Thereareseveral standardtexteditors availableon most UNIX systems:


ed - standardlineeditor.
ex - extended lineeditor.vi- a visualeditor;
ful
Screen;uses ed/ex line-modecommands for global fileediting.

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

vi-rfilename Recover crashedfile

viewfilename Open read-only


file
CursorCommands

Command Description

h Move leftone character

Move down one line

k Move up one line

Move rightone character

Move rightone word

W Move rightone word (pastpunctuation)

b Move leftone word

B Move leftone word (pastpunctuation)

e
Move to end ofcurrentwor

Return Move down one line

Backspace Move leftone character

Spacebar Move rightone character

H Move to top of screen

M Move to middleofscreen

L Move to bottom of screen

Ctrl-F Page forwardone screen


Com mand
Description

Ctrl-D Scroll
forwardone-half
screen

Ctrl-B Page backward one 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

CW Change word (orpartofword)to rightofcursor

cC Change line

C Change from cursorto end of line

S Substitute
stringforcharacter(s)
from cursorforward

Replacecharacterat cursorwith oneothercharacter

rReturn Breakline

Joincurrentlineand linebelow
Command Description

to right
character
Transposecharacterat cursorand

Change case ofletter(uppercaseor lowercase)

Undo previouscommand

U Undo all
changesto currentline

Undo previouslast-line
command

DeletingText

Command
Description

Deletecharacteratthe cursor

X Deletecharacterto the leftof the cursor

dw
Delete word(orpartofword to rightofcursor)

dd Deletelinecontaining
the cursor

D Deletepartoflinetorightofcursor

dG Deleteto end offile

diG Deletefrom beginningoffile


to cursor

:5,10
d Deletelines5-10

Copyingand Moving Text

Command Description

yy Yank or copyline

Y Yank or copy line

Putyanked or deletedlinebelowcurrentline
Command
Description
P
Put yanked ordeletedlineabove
currentline

:1,2co 3 Copy lines1-2and put afterline3

:4,5m 6 Move lines4-5 and put afterline6

SettingLineNumbers

Command Description

:setnu Show linenumbers

:setnonu Hide linenumbers

Setting
Case-sensitivity

Command Description

:setic Searchesshould ignorecase

:setnoic Searches should be case sensitive

Findinga Line

Command Description

Go tolastlineof file

1G lineoffile
Go to first

21G Go to 21
line

Searchingand Replacing

Command Description

Istring Searchforstring

?string Searchbackward forstring

ofstring
Find nexXt occurrence insearchdirection
Com mand Deseription

N in search direction
Find previousoccurrenceofstring

:g/search/sl/replacelg Search and replace

Clearing
the Screen

Command Deseription

Ctrl-L Clear(refresh)
scrambledscreen

aFile
Inserting Intoa File

Command Description

rfilename Insert(read)
file
aftercursor

:34 rfilename Insertfile


afterline
34

Savingand Quitting

Com mand Description

:W Save changes(writebuffer)

:wfilename Writebufferto named file

:W Save changes and quitvi

ZZ Save changes and quitvi

:q! Quit withoutsavingchanges

You might also like