Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit-1 Linux

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

Unit 1 : An Introduction to Linux OS

Linux is a Kernal & collection of software together create an O.S. Linux is a


modern, free open source system based on UNIX, Linux is a true 32/64-bit operating
system that run on different platforms. It is a multi-user, multi-tasking and time
sharing operating system.
The Linux OS derived its name from its creator, Linux Torvalds in 1991 with main
goal of compatability & open source.
Linux started writing the Linux kernel in 1991, as a hobby, and created one of the
most powerful operating systems available today. The most important factor for the
success of Linux is that it is free. It can be copied and distributed without having to
pay any fee . The Linux kernel currently supports running multiple concurrent
CPU’s on any given system

History of Linux
All modern operating systems have their roots in 1969 when Dennis Ritchie and
Ken Thompson developed the C language and the UNIX operating system (1975)
at AT&T Bell Labs. . By 1975, when AT&T started selling UNIX commercially. The
peoples were not happy that a commercial company sold software that they had
written; the resulting legal in there being two versions of UNIX in the Seventies: the
official AT&T UNIX, and the free BSD UNIX.

In the Eighties many companies started developing their own UNIX:


IBM created AIX,
Sun- SunOS (later Solaris),
Mac OS- (Apple)
HP- (HP-UX) and
about a dozen other companies did the same.

The result was a mess of UNIX has dozen different ways to do the same thing. And
here is the first real root of Linux, when Richard Stallman aimed to end this era of
UNIX separation and everybody re- inventing the wheel by starting the GNU project
(GNU is Not Unix). His goal was to make an operating system that was freely
available to everyone, and where everyone could work together (like in the
Seventies). Many of the command line tools that you use today on Linux or Solaris
are GNU tools.

The Nineties started with Linus Torvalds, a Swedish speaking Finnish student,
buying a 386 computer and writing a brand new kernel. He put the source code
online, thinking it would never support anything but 386
Operating System

hardware. Many people embraced the combination of this kernel with the GNU tools,
and the rest, as they say, is history.
Features of Linux Operating System
Multiprogramming
Linux is a multiprogramming system means multiple applications can run at same
time.

Time-Sharing
Multi-programming is made possible on the Linux system by time-sharing feature.

Multi-Tasking
A program in Linux is broken down into tasks, each task is something like reading
from or writing to the disk, or waiting for input from a user. The ability of any as to
handle the execution of multiple tasks is known as multi-tasking.

Multi-User
Linux is a multiuser system means multiple users can access system resources like
memory, ram, and application programs at same time.

Open Source
Linux source code is freely available and it is community based development
project. Multiple teams’ works in collaboration to enhance the capability of Linux
operating system and it is continuously evolving.

Light Weight
OS Size is very small as compare to other OS

Secure
It provide more security cause Linux uses Commands for every action, so attack is
not performed easily by attacker.

The Advantage of Linux Operating System


Cost
The most important advantage of using Linux is the fact that it is free to obtain.
Linux distribution can be installed on any number of computers, without paying a
single penny.

Reliability
Users on the Linux operating system work consistently with the Linux server, without
reporting any operating system failures.

200
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Paper XI
Simple Upgrade and Installation
Architecture of LinuxProcess
-2nd topic: UNIT 1: Introduction to Linux Subject :
The installation procedure of most Linux versions is menu-driven. It includes the
ability to upgrade from prior versions. The upgrade process preserves the existing
configuration files and maintains a list of its actions during installation.

Excellent Security Features


Security - Linux provides user security using authentication features like password
protection/ controlled access to specific files/ encryption of data. This is the reason
why many Internet Service Providers (ISPs) are replacing their current OS with
Linux systems.

GUI Interface
The graphical interface for Linux is the X Window system. It is divided into two sub
systems consisting of a server and a client. Linux has a number of graphical user
interfaces called Desktop Environments, such as K Desktop Environment (KDE) and
GNU Object Model Environment (GNOME), both of which are versions of the X
Window system.

Architecture of Linux OS
Architecture of Linux operating system

The architecture of Linux is composed of kernel, shell and application programs that is softwares.

APPLICATION PROGRAMS
SHELL
HARDWA
RE

KERNEL

HARDWARE: physical parts of a computer, such as central processing unit (CPU), monitor, mouse,
keyboard, hard disk and other connected devices to CPU.

KERNEL:

1. Kernel is core (main) part of Linux operating system.


2. It is collection of routine communicate with hardware directly.
3. It loads into memory when Linux is booted.
1
4. Kernel provides support to user programs through system call.
Operating System
5. Kernel manages Computer memory, schedules processes, decides priorities of
processes and performs other tasks.
6. Kernel does lot of work even if
no application software is running Hence kernel often called as application software gateway to the
computer resources

Shell
1. Shell is interface between user and kernel.
2. It is outer part of operating system.
3. A shell is a user interface for access to an operating system's services Shell is an environment
in which we can run our commands, programs, softwares and shell scripts.

4. Computers do not have any inherent capability of translating commands into actions, it is done
by Shell.
5. There can be many shells in action - one shell for each user who logged in.

How Shell works?


When we enter commands through the keyboard, it gathers input from you and executes programs
based on that input. When a program finishes executing, it displays that program's output. OR the shell
thoroughly examines the keyboard input for special characters. If it finds any, it rebuilds a simplified
command-line, and finally communicate with the Kernel to see that the command is executed.
To know the running shell, use echo $SHELL command in terminal.

Application programs/software
An application, or application program, is a software program that runs on your computer. It is
excited by user. Some inbuilt application programs in Linux are terminal, Firefox browser, Libre
office

System calls
There are over a thousand commands available in Linux operating system. These all
commands use a function to communicate with kernel - and it is called as system call.
System call is the interface between a process and an operating system or System
calls are the only entry points into the kernel system

Linux Distribution
A complete Linux system package called a distribution
A Linux distribution includes the Linux kernel, software modules from the GNU Project, an
2
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
installation program, window manager (user interface), utilities,
Paper XI applications and
Architecture of Linux -2 topic: UNIT 1: Introduction to Linux
nd
Subject :
documentation.
Many Linux distributions are available to meet just about any computing requirement
you could have customized for a specific user group, such as business users., software
developers, or average home users. Each customized distribution includes the software
packages required to support specialized functions, such as audio and video editing
software for multimedia enthusiasts, or compilers and integrated development
environment for software developers .

Ubuntu -
Suitable for: Recommended for new users.Developers, Professionals, Students
About: Ubuntu is a popular, open source desktop operating system with all the 
essential applications such as an office suite, browsers, email and media apps, etc.
For instance, you can create professional documents, spreadsheets and presentations on Ubuntu with
LibreOffice.

· Fedora
Suitable for: an excellent desktop, also good for new users , Developers,
Students
About: The distribution creates a platform ideal for hardware, containers and the cloud,
allowing software developers and the community members to build tailored
solutions for their users. Fedora Workstation is a user-friendly operating system that
supports a wide range of developers, from students to professionals in corporate
environments.

. Debian
Suitable for: Beginner
Debian is a popular stable and secure Linux based operating system
features are:
Extensive hardware support
Provides smooth upgrades
Security support for releases.
Free and open-source software.

ArchLinux:
Suitable for: Programmers and Developers
About: Arch Linux is a lightweight and flexible Linux distribution with a simple user environment. The
features of this distribution include pragmatic distribution, user centrality, versatility, simplicity, among
others

3
Operating System Linux Mint
Suitable for: Professionals, Developers, Students
About: Linux Mint is one of the most popular desktop Linux distributions that is both free and open
source. It provides full multimedia support and is extremely easy to use

Open SUSE
Suitable for: Beginners and advanced users & Corporate/Enterprise
About: openSUSE, formerly known as SUSE Linux, is one of the most easy to use Linux
distributions. The aim of this distribution is to create usable open-source tools for software developers
and system administrators while providing a user-friendly desktop and feature-rich server
environment.

Sparky Linux
Suitable for: Gamers
About: SparkyLinux is a GNU/Linux distribution created on top of Debian GNU/Linux operating
system. The fast, lightweight and fully customisable operating system offers different versions for
different tasks, including a fully featured OS with a lightweight desktop environment .
Special editions: GameOver, Multimedia , CLI Edition

Tails
Suitable for: Security and privacy
About: Tails is a portable operating system. The OS uses the Tor network to protect privacy online.
Also, Tails includes a selection of applications to work on sensitive documents and communicate
securely. Features include advertising and viruses; leaves no trace on the computer when shut down;

based on Debian GNU/Linux etc.

Zorin OS

Suitable for: Beginners, Professionals


About: Zorin OS is a powerful operating system designed to make your computer faster, more
secure and easier to use. The operating system supports over 50 languages and comes pre-loaded
with assistive technologies. Features include flexibility, accessibility, compa tibility, etc.

Debian GNU/Linux –
Very strict about the “freeness” of the known as Debian GNU/Linux, is a Linux distribution composed
of free and open-source software, developed by the community-supported Debian Project.

Slackware Linux –
Old school. Slackware aims for design stability and simplicity and to be the most "Unix-like" Linux
distribution.[4] It makes as few modifications as possible to software packages

4 Red Hat Enterprise Linux –


B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Corporate/Enterprise server.
Paper XI
Red Hat Enterprise LinuxArchitecture of Linux
can be purchased -2nd topic:
to support specific Introduction
UNIT 1:use to Linux Subject :
cases like edge
computing or SAP workloads, Certified in the cloud ,Security and compliance ,Support for emerging
technology

Manjaro

Linux is a fast, desktop-oriented operating system based on Arch Linux. User-friendly. The clear
reason that beginners prefer to switch from Windows, is being user-friendly, Great Hardware
support

5
Operating System

6
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Paper XI
Architecture of Linux -2nd topic: UNIT 1: Introduction to Linux Subject :

7
Operating System

8
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Paper XI
Architecture of Linux -2nd topic: UNIT 1: Introduction to Linux Subject :

Lesson 2 : Structure and Comparison of Linux


Learning Objectives

On completion of this lesson you will be able to know:

 About Linux Architecture


 Difference between Linux and UNIX
 Difference between Linux and Windows
 About distribution of Linux

Linux Architecture

The Linux operating system consists of three main software components as shown
below:

Linux Architecture

Components of the Linux OS

Kernel
The kernel is a program that constitutes the central core of a computer operating
system. It has complete control over everything that occurs in the system. Since the
kernel communicates directly with the hardware, the parts of the kernel must be
customized to the hardware features of each system. However, the kernel does not
deal directly with a user. Instead, the login process starts up a separate, interactive
program, called the shell, for each user.

Shell
A shell is a program that provides the traditional, text-only user
interface for Linux and other Unix-like operating systems. Its primary function is to
read commands that are typed into a console (i.e., an all-text display mode)
or terminal window (an all-text window) in a GUI (graphical user interface) and then
execute (i.e., run) them. The features of the shell will be discussed in lesson 2 unit
4.

9
Operating System

Linux Utilities and Application Programs


The Linux utilities or commands are a collection of programs that service day-to-
day processing requirements. These programs are invoked through the shell, which
is itself another utility. Apart from the utilities provided as part of the Linux operating
system, more than a thousand Linux-based application programs, like database
management systems, word processors, and various other programs are available
from independent software vendors.

Linux as compared to UNIX

Linux was developed considering UNIX as a reference model. This is why; the basic
architecture and most of the features of Linux and UNIX are the same. Actually,
Linux is also considered another version of UNIX. The main difference between
Linux and UNIX is that Linux is FREE. Various distributors of Linux charges a price,
which is quite low as compared to other operating systems.

The Linux operating system requires at least 850 MB hard disk space, 64MB
Memory for Red hat Linux 9.0.

Comparison between Linux and UNIX

Feature Linux Unix


Shell
bash, pdksh, tcsh zsh, Bourne, korn, C
Available
ash
AT&T, MULTICS, BSD,
Red Hat, Caldera,
Variants SCO, HP-Ux, IRIX, Ultrix,
Debain, LinuxPPC, Sun Solaris
SUSE
Licensing Freely Distributed Expensive licensing

Linux as compared to Windows

Most of the organizations having small, medium, or large networks require a few
basic services such as file and print services, E-mail access, Internet access, and
Intranet services. Most of the tasks that you are wanting to execute on a Windows
machine can also be executed on a Linux machine.
The following table compares some of the common applications used on the Linux
and Windows operating systems.
Comparison between Linux and Windows
Service Linux Windows
Internet Information
Web Server Apache
Server
Email Server Send mail Microsoft Exchange
Relational Sybase /MYSQL Microsoft SQL Server
Database
Proxy Server Squid Object Windows Pro Server
Cache
Included with
Backup Server BRU
Windows

10
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Paper XI
Architecture of Linux -2nd topic: UNIT 1: Introduction to Linux Subject :

The distributor of Linux

A Linux distribution is collection software of (usually open source) software on top


of a Linux kernel. A distribution (or short, distro) can bundle server software,
system software
A Linux distribution is collection management tools,
of (usually documentation and many desktop applications in a
open
central secure
source) software on top of a Linux kernel. software repository. A distro aims to provide a common look and
feel, secure and easy software management and often a specific operational
purpose.
Let's take a look at some popular distributions.

Red Hat

Red Hat is a billion dollar commercial Linux Company that puts a lot of effort in
developing Linux. They have hundreds of Linux specialists and are known for their
excellent support. They give their products (Red Hat Enterprise Linux and Fedora)
away for free. While Red Hat Enterprise Linux (RHEL) is well tested before
release and supported for up to seven years after release, Fedora is a distro with
faster updates but without support.

Ubuntu
Canonical started sending out free compact discs with Ubuntu Linux in 2004 and
quickly became popular for home users (many switching from Microsoft Windows).
Canonical wants Ubuntu to be an easy to use graphical Linux desktop without need
to ever see a command line. Of course they also want to make a profit by selling
support for Ubuntu.

Debian
There is no company behind Debian. Instead there are thousands of well
organised developers that elect a Debian Project Leader every two years. Debian is
seen as one of the most stable Linux distributions. It is also the basis of every
release of Ubuntu. Debian comes in three versions: stable, testing and unstable.
Every Debian release is named after a character in the movie Toy Story.

11
Operating System

Exercises
Multiple choice questions

a. Web server on Linux is called

(i) Extensive Scan apache


(ii) internet information server (IIS)
(iii) BRU
(iv) Squid Object Cache

b. How many bytes of hard disk are required at least to install Linux
Operating Systems?

(i) 500 MB
(ii) 850 MB
(iii) 300 MB
(iv) 1000 MB

Questions for short answers

a. Draw a block diagram of Linux OS Architecture


b. Note the functions of Shell.
c. List the Linux utilities and application programs

Analytical questions

a. What is Kernel? Describes the functions of Kernel.


b. Compare The Linux to UNIX.
c. What are the services distinguish Linux from Windows?
d. Describes the distributors namely REDHAT and Ubuntu.
Architecture of Linux operating system

The architecture of Linux is composed of kernel, shell and application programs that is softwares.

APPLICATION PROGRAMS
SHELL
HARDWARE

KERNEL

12
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Paper XI
Architecture of Linux -2nd topic: UNIT 1: Introduction to Linux Subject :

HARDWARE: physical parts of a computer, such as central processing unit (CPU), monitor, mouse,
keyboard, hard disk and other connected devices to CPU.

KERNEL: A kernel is a computer program and is the central, core part of an operating system. It manages
the operations of the computer and the hardware, most notably memory and CPU time. It is an integral
part of any operating system.

SHELL: Shell is an environment in which we can run our commands,


programs, and shell scripts. It is a user interface for access to an operating
system's services. (User interface program execution, file system manipulation, input/output
operations, communication, resource allocation, error detection, security and protection)

13
Operating System

The diagram of kernel shell user relationship is as below:

THE KERNEL
1. Kernel is core (main) part of
Linux operating system.
2. It is collection of routine
communicate with
hardware directly.
3. It loads into memory when
Linux is booted.
4. Kernel provides support to
user programs through
system call.
5. Kernel manages Computer
memory, schedules
processes, decides
priorities of processes and
performs other tasks.
6. Kernel does lot of work even if
no application software is running.
7. Hence kernel often called as application software gateway to the computer
resources.
8. Kernel is represented by /boot/vmlinuz.

Shell
1. Shell is interface between user and kernel.
2. It is outer part of operating system.
3. A shell is a user interface for access to an operating system's services Shell
is an environment in which we can run our commands, programs,
softwares and shell scripts.
4. Computers do not have any inherent (मळची) capability (क्षमता) of translating commands into
actions, it is done by Shell.
5. There can be many shells in action - one shell for each user who logged in.
14
B.Sc. Part –III Comp.Sci. (Sem– V) CourseCode: DSE-23E Computer
Paper XI
Architecture of Linux -2nd topic: UNIT 1: Introduction to Linux Subject :

How Shell works?


When we enter commands through the keyboard, it gathers input from you and executes programs
based on that input. When a program finishes executing, it displays that program's output. OR the shell
thoroughly examines the keyboard input for special characters. If it finds any, it rebuilds a simplified
command-line, and finally communicate with the Kernel to see that the command is executed.
To know the running shell, use echo $SHELL command in terminal.

Application programs/software

An application, or application program, is a software program that runs on your computer. It is excited by
user. Some inbuilt application programs in Linux are terminal, Firefox browser, Libre office

System calls
There are over a thousand commands available in Linux operating system.
These all commands use a function to communicate with kernel - and it is called
as system call.
System call is the interface between a process and an operating system or
System calls are the only entry points into the kernel system

Ex. 1) a typical Linux writes a file with write system call. Same system call can access both a file and
device.

2) Open system call opens both file and device. These system calls are built into kernel. And
interaction through the system calls represents and efficient means of communication with operating
system.

What is a Linux Distribution?


Well, now as you know that Linux is open-source, free to use kernel. It is used by programmers,
organizations, profit and non-profit companies around the world to create Operating systems to suit
their individual requirements.

To prevent hacking attempts, many organizations keep their Linux operating systems private.

Many others make their variations of Linux available publicly so the whole world can benefit at large.

These versions/ types /kinds of Linux operating system are called Distributions.

There are hundreds of Linux operating systems or Distributions available these days. Many of them
are designed with a specific purpose in mind. For example, to run a web server or to run on network
15
Operating System

switches like routers, modems, etc. The latest example of one of the most popular smartphone-
based Linux Distribution is Android!

Introduction to Linux Terminal


Linux terminal is a standard way of interacting with the Linux server.

The application of the command line might look like a difficult task but it's very convenient if we begin with the basics and
create our skills from there.

Let's get it started by covering up what is a terminal emulator.

The Linux terminal is also known as command-line, console, or shell. It is a text interface for our Computer. We
can interpret the commands and also write our scripts with this system program.

It might look difficult at first but once we get familiar to do it, it will be easy to use.

o ~: It is the current directory. The tilde or ~ is a unique character that is a default shell that expands to the way of
the home directory of the current user in bash. In this case, it presents /home/sammy
o $: It is the symbol of prompt. It represents the completion of the command prompt after which the keyboard input
of the user will occur.

Executing Commands
Commands could be issued on the command prompt by describing the executable file's name which could be a script or
binary program. There are several standard Linux utilities and commands that can be installed using the operating system
that permits us to navigate with the file system, software packages and installs, and configure the application and system.

An instance of the executing command is called a process. If a command is run inside the foreground (default path
where commands are run), the user should wait for the procedure to complete before being back to the command prompt
on which point they could continue issuing other commands.

It is necessary to note that most of the Linux are case sensitive including options, arguments, commands, directory
name, and file name. When something is not implementing as expected, then double-check the case and the spelling of
our commands.

We will execute by some examples that will be basic terms of the executing command.

16

You might also like