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

kg linux

The document provides an overview of the Linux operating system and shell programming, detailing its functions, types, history, and features. It explains the role of the kernel, memory management, process management, and device management, as well as the significance of open-source development. Additionally, it highlights various applications and utilities available in Linux, emphasizing its portability, security, and multi-user capabilities.

Uploaded by

supravat.p2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

kg linux

The document provides an overview of the Linux operating system and shell programming, detailing its functions, types, history, and features. It explains the role of the kernel, memory management, process management, and device management, as well as the significance of open-source development. Additionally, it highlights various applications and utilities available in Linux, emphasizing its portability, security, and multi-user capabilities.

Uploaded by

supravat.p2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 88

Department of Computer Science

Subject Name : Linux & Shell Programming


Subject Code : 43A
Class : II B.Sc. CS
Semester : IV
Prepared by : Hemalatha K
Assistant Professor
Department of Computer Science
KG College of Arts and Science
UNIT I:
⚫Introduction to LINUX Operating System: Introduction -
The LINUX Operating System.
LINUX AND SHELL PROGRAMMING
UNIT
⚫Operating System – Overview
– I
⚫An Operating System (OS) is an interface between a
computer user and computer hardware.
⚫ An operating system is a software which performs all
the basic tasks like file management, memory
management, process management, handling input
and output, and controlling peripheral devices such as
disk drives and printers.
⚫Some popular Operating Systems include Linux,
Windows, OS X, VMS, OS/400, AIX, z/OS, etc.
Definition

⚫An operating system is a program that acts as an


interface between the user and the computer
hardware and controls the execution of all kinds of
programs.
Following are some of important functions of an
operating System .
⚫Memory Management
⚫ • Processor Management
⚫ • Device Management
⚫ • File Management
⚫ • Security
⚫• Control over system performance
⚫ • Job accounting
⚫ • Error detecting aids
⚫ • Coordination between other software and users
Memory Management
⚫Memory management refers to management of
Primary Memory or Main Memory.
⚫Main memory is a large array of words or bytes where
each word or byte has its own address
⚫Keeps tracks of primary memory, i.e., what part of it
are in use by whom, what part are not in use.
⚫• In multiprogramming, the OS decides which process
will get memory when and how much.
⚫ • Allocates the memory when a process requests it to
do so.
Processor Management

⚫In multiprogramming environment, the OS decides


which process gets the processor when and for how
much time. This function is called process scheduling
Device Management
⚫Keeps tracks of all devices. Program responsible for
this task is known as the I/O controller.
⚫ • Decides which process gets the device when and for
how much time.
⚫ • Allocates the device in the efficient way.
⚫ • De-allocates devices.
File Management
⚫ A file system is normally organized into directories
for easy navigation and usage.
⚫• Keeps track of information, location, uses, status etc.
The collective facilities are often known as file system.
• Decides who gets the resources.
⚫• Allocates the resources.
⚫ • De-allocates the resources.
Other Important Activities

⚫ Security −
⚫• Control over system performance
⚫• Job accounting
⚫ • Error detecting aids
⚫• Coordination between other softwares and users −
Coordination and assignment of compilers,
interpreters, assemblers and other software to the
various users of the computer systems
Different types of Operating
System

⚫Key difference: Operating Systems, shortly OS is an


intermediate between the computer hardware and
users.
⚫ It is a collection of software which manages the
computer hardware resources and provides common
services for computer programs
Operating systems (OS)
⚫Operating systems (OS) are known to simplify and
provide the human computer interactions.
⚫These are responsible for connecting the user-defined
application programs with the hardware; due to
which it becomes easy to access over the computers
⚫Real-Time Operating System:
⚫ Real-time Operating System also known as RTOS; are
used for managing the control machinery, scientific
instruments and industrial systems.
⚫Hard Real-Time Systems- the system guarantee the
completion of the critical task on time
⚫Single-User, Single Task Operating System:
From the names itself it gets clear that these operating
systems work on single task and single user at a time.
Here, a single tasks or operation can be carried out
efficiently and thoroughly by a single user.
⚫Single-User, Multi-Task Operating System:
These operating systems works on more than one task
and process them concurrently at a time. The
processors of this OS divides the time among the
several executed tasks
Multiuser Operating System:
In these OS, multiple users are allowed to access the
same data or information at a time via a network.
⚫Multiprocessing Operating System:
A single process runs on two or more processors. All
the processing and their management takes place in a
parallel way, hence this OS are also called as Parallel
Processing.
⚫Embedded Operating System:
Embedded Operating Systems are designed to run on
devices with limited resources, such as smartphones,
wearable devices, and household appliances.
Examples include Google’s Android and Apple’s iOS.
⚫Distributed Operating System:
⚫ In these OS, the computers work in co-operation
with each other. As this OS manages a group of
independent computers and makes them appear to be
a single computer is known as a distributed operating
system.

A History of Linux
Prehistory of Linux
• The Unix operating system was developed by
Ken Thompson and Dennis Ritchie of AT&T
Bell Laboratories in 1969 and first released in
1970.
Prehistory of Linux
• In 1977 the University of California, Berkeley
released a free UNIX-like system, Berkeley
Software Distribution (BSD). But BSD
contained Unix code, so AT&T sued.
Prehistory of Linux
• In 1983, Richard Stallman started the GNU
project to create a free UNIX-like operating
system. Hurd (the GNU kernel) failed to
attract enough developers, leaving GNU
incomplete.
Prehistory of Linux
• In 1987 Andrew S.
Tanenbaum
released MINIX, a
Unix-like system
intended for
academic use.
While source code
for the system was
available,
modification and
redistribution were
restricted.
Linus Benedict Torvalds
• Born: December 28,
1969 (age 45)
• Born in Helsinki, Finland
• Chief developer on the
Linux kernel
• Created the revision
control system Git
• 2014 IEEE Computer
Society Computer
Pioneer Award
Linux
• Torvalds made the code of Linux
freely available to everyone on the
internet, and therefore lots of people
created their own versions of Linux.
Linux
• Linux is therefore an example of Open-
source software, in which the copyright
holder provides the rights to study,
change and distribute the software to
anyone and for any purpose.
• Open-source software is often
developed in a public, collaborative
manner.
Timeline of
Linux
1992 199
V0.0 6
1 V2

199 201
4 1
V1 V3

201
5
V4
Timeline of
Linux

1992 1993 1994 1996 2000 2002 2004 2006 2008 2011
V0.01 Slackware SUSE V2 Knoppix Gentoo Ubuntu Alpine Musix Mageia

1993 1994 1995 2002 2003 2004 2006 2008 2011


Debian V1 Red Hat Arch Fedora CentOS Oracle Android V3

201
5
V4
Kern
el
Kern She
el ll
She
ll

Kern
el
Comman
ds

Shel
l

Kern
el

Hardwar
e
May
Red Hat 1995

• In 2003 Red Hat Linux merged with


the community-based Fedora
Project
• Introduced a graphical installer
called Anaconda and Lokkit for
configuring the firewall capabilities.
Developed by:
Bob Young, Marc
Ewing
and Red Hat Inc.
October
Ubuntu 2004

• Committed to open source development;


encouraged to use free software, study
how it works, improve upon it, and
distribute it.
• Named after the Southern African
philosophy of ubuntu (literally, "human-
ness").Developed by:
Mark Shuttleworth
and
Canonical Ltd.
THANK
YOU
What Is Linux?

❖In the simple language Linux is an operating system (OS).


❖We all are familiar with other operating systems like Microsoft windows,
Apple Mac OS, iOS, Google android, etc, just like them linux is also an
operating system.
❖ An operating system is a software that enables communication between
computer hardware and software
WHO CREATED LINUX?

✔Linux is an operating system or a kernel which germinated as an idea in the mind of young and bright
Linus Torvalds when he was a computer science student.
✔ He used to work on the UNIX OS (proprietary software) and thought that it needed improvements.
WHERE I CAN USE LINUX?

�Stable
�Robust
�Secure
�High Performance
On stand alone workstation/PC for word processing, graphics,
software development, internet, e-mail, chatting, small personal
database management system etc.
In network environment as:

�File and Print or Application Server


So you can use Linux for:
�Personal Work
�Web Server
�Software Development Workstation
�Workgroup Server
�In Data Center for various server activities such as FTP, Telnet, SSH, Web, Mail,
Proxy, Proxy Cache Appliance etc
WHAT KERNEL IS?

Kernel is hart of Linux Os.


It manages resource of Linux Os. Resources means facilities available in
Linux. For e.g. Facility to store data, print data on printer, memory, file
management etc .
Kernel decides who will use this resource, for how long and when. It runs
your programs (or set up to execute binary files).
TASK
I/O management
Process management
Device management
File management
Memory management
WHAT IS LINUX SHELL ?

Computer understand the language of 0's and 1's called binary language.
In early days of computing, instruction are provided using binary language,
which is difficult for all of us, to read and write.
In Os there is special program called Shell. Shell accepts your instruction or
commands in English (mostly) and if its a valid command, it is pass to kernel.
❖Tip:To findall available shells inyour systemtype following
command:
$ cat /etc/shells
❖Tip: To find your current shell type following command $ echo $SHELL
Features of Linux
SOME OF THE FEATURES OF LINUX OS ARE

⦿ Multiprogramming
⦿ Time sharing
⦿ Multi tasking
⦿ Virtual memory
PORTABLE −
⦿ Portabilitymeans software can works on
different types of hardware in same way.
Linux kernel and application programs
supports their installation on any kind of
hardware platform.
OPEN SOURCE
⦿ Linux source code is freely available and it
is community based development project.
Multiple teams work in collaboration to
enhance the capability of Linux operating
system and it is continuously evolving.
MULTI-USER
⦿ −Linuxis a multiuser system means multiple
users can access system resources like
memory/ ram/ application programs at same
time.
MULTIPROGRAMMING
⦿ Linux is a multiprogramming system means
multiple applications can run at same time.
HIERARCHICAL FILE SYSTEM
⦿ Linux provides a standard file structure in
which system files/ user files are arranged.

⦿ Shell − Linux provides a special interpreter


program which can be used to execute
commands of the operating system. It can be
used to do various types of operations, call
application programs. etc.
SECURITY
⦿ Linux provides user security using
authentication features like password
protection/ controlled access to specific
files/ encryption of data.
UTILITIES

⦿ Samba
⦿ Cron scheduler
⦿ Licencing
⦿ Web server .
SAMBA :

⦿ The
name samba is derived from the server
message block protocol or SMB.

⦿ SMBis the protocol used by Microsoft OSs to


share files and printers.

⦿ Sambais a suit of programs that implement


the SMB protocol on Linux
⦿ Using samba Linux file system can be shared
with windows 95, windows 98 or windows NT.
⦿ Also you can also share a windows 95/98/NT
file system with linux.
⦿ Similarly, SMB can be used to share printers
connected to windows 95/98 NT computers
with Linux.
⦿ Note : A Protocol is a set of rules that
specify the communication standards for
data transfer.
⦿ A file system is a mechanism used by an OS
to store and manage files and directories
on a storage medium.
CRON SCHEDULER

� Linux has a scheduler program called


cron.
� Cron is used to run commands, scripts
or programs at scheduled times.
LICENSING

⦿ Linuxis licensed under the GNU general


public license.

� The licensing for red hat linux states that a person


can make any number of copies of software and
distribute it freely or charge a price for it.

� Linux can also be downloaded free of cost from the


internet.
WEB SERVER :

⦿ Web server is a process that runs on the OS


and enables users to access resources that
have been published in the form of web
pages.
⦿ A web server can enable users to access
resources on a wide area network (WAN ) or
the internet.
⦿ A web server is commonly referred to as a
computer that delivers web pages.
⦿ Linux OS comes with the apache web server.

⦿ For example : when the address of a web site


is typed say www.apache.org in a web
server, the apache web server sends the
home page of the web site to your computer.
⦿
Basic Features of Linux
a) Portable − Portability means software can works on different
types
of hardware in same way.

b) Open Source − Linux source code is freely available and


it is community based development project.

b) Multiprogramming − Linux is a multiprogramming system


means multiple applications can run at same time.

b) Security − Linux provides user security using authentication


features like password protection/ controlled access to specific
files/ encryption of data.
Components of Linux
System
a) Kernel − Kernel is the core part of Linux. It is responsible for
all major activities of this operating system.

b) System Library − System libraries are special functions or


programs using which application programs or system utilities
accesses Kernel's features

c) System Utility − System Utility programs are responsible to


do specialized, individual level tasks.
Architecture of Linux Operating
System
SHELL UTILITIES APPLICATION PROGRAM

KERNEL

HARDWARE
The architecture of Linux contains some
layers :
a) Hardware layer − Hardware consists of
all peripheral devices (RAM/ HDD/ CPU
etc).
b) Kernel − It is the core component of Operating
System, interacts directly with hardware,
provides low level services to upper layer
components.
c) Shell − It takes commands from the user
and executes kernel's functions.
d) Utilities − Utility programs that provide the user
most of the functionalities of an operating
About Kernel
It interacts with the actual hardware in
machine language.

It is the monarch who has overall control


of everything.

It has various functions such as file management


, data transfer between file system and hardware,
memory management, scheduling of various
programs in the memory, interrupts issues.
User-Interface of Linux
The user interface is either a command line interface
(CLI), a graphical user interface (GUI), or through
controls are associated with hardware.

CLI shells are text based user interfaces, which use text
for
both input and output.

On desktop systems, the most popular user interfaces


are the GUI shells.

Most popular user interfaces are based on the X


Software application for Linux
OpenOffice: word processing,
spreadsheets, drawing

Adobe Acrobat Reader

Konqueror: The KDE File Manager and


Web Browser,TV, Video, Radio, and
Webcam
Editors of
Linux
There are some editors in
Linux
a) Vi/Vm editor
b) Gedit editor
c) Nano editor
d) GNU Emacs editor
e) Kate/Kwrite editor
f) Lime Text
editor and many
more.
Commands of Linux
There are some commands in Linux which give direct
accessories to the files by using terminal.
Some of them are:
ls- (List Command)

mv- (Move Command) mkdir-

(Make Directories) rmdir-

(Remove Directory)

locate- (Locate Directory) etc..,


Merits and Demerits of Linux
It can be easily accessible to the old computers .

It is not easy to understand for those who are new


to Linux.

It is mostly used by the programmers.

It is used for both commercial and personal but for


home purpose, for this Windows is mostly
preferred.
Use of Linux in various fields

Game
Operating System
Designing
Routers/Transmittin
for
Android App
g Devices.
Development

It is used also used in the department of Defence, Education.


It is also popular in the field of Banking or Government
Sector.
Linux is an example of Open Source
software development and Free
Operating System (OS).

Unix is an operating system that is very


popular in universities, companies, big
enterprises etc.
Linux OS is great for small- to medium-
sized operations, and today it is also used
in large enterprises where UNIX was
considered previously as the only option.
.
If an enterprise used massive symmetric
multiprocessing systems, or systems with
more than eight CPUs, they needed to
run UNIX in the past.
UNIX was far more capable in handling all
the processes more effectively than Linux
Linux can be freely distributed,
downloaded freely, distributed through
magazines, Books etc. There are priced
versions for Linux also, but they are
normally cheaper than Windows.

Different flavors of Unix have different


cost structures
Everyone. From users
developers home and to
alike.
computer enthusiasts
Unix operating systems were developed
mainly for mainframes, servers and
workstations. The Unix environment and
the client-server program model were
essential elements in the development of
the Internet.
Linux typically provides two GUIs,
KDE and Gnome. But Linux GUI is
optional.
but later a GUI was created called
Initially
CommonUnix was a command
Desktop based OS,
Environment. Most
distributions now ship with Gnome.
Linux has had about 60-100 viruses listed
till date. None of them actively spreading
nowadays.
A rough estimate of UNIX viruses
betweenis 85 -120 viruses reported
till date.
FEATURES LINUX UNIX

Shell available Bash, pdksh, tcsh, Bourne, korn,


zsh, ash. C.
Variants Red hat, caldera, AT and T,
debian, linux PPC, MULTICS,
suse. BSD, SCO,
HP, UX, IRIX,
UHRIX,
XENIX,
Sunsolaris.
Licencing Freely distributed Expensive
licencing.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy