LSP Unit 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

UNIT – I

Introduction to Linux: Linux distributions, Overview of Linux operating system, Linux


architecture, Features of Linux, Accessing Linux system, Starting and shutting down
system, Logging-in and Logging-out, Comparison of Linux with other operating systems.

YOU CAN FOLLOW: -


1. UNIX Shell Programming, By Yashavant Kanetkar
2. Your Unix The Ultimate Guide, By Sumitabha Das
________________________________________________________________________

Operating System: -
An operating system acts as an intermediary/interface between computer user and computer
hardware. The operating system is designed in such a way that it can manage the overall
resources and operations of the computer. It is a fully integrated set of specialized programs
that handle all the operations of the computer. It controls and monitors the execution of all
other programs that reside in the computer, which also includes application programs and
other system software of the computer.

An operating system is an integrated set of specialised programs that are used to manage
over all resources and operations of the computer.

You interact with an operating system through a user interface, which allows the operating
system to receive and interpret instructions sent by the user. You need only send an
instruction to the operating system to perform a task, such as reading a file or printing a
document. An operating system’s user interface can be as simple as entering commands on
a line or as complex as selecting menus and icons on a desktop.

The computer system can be divided roughly into four components: the hardware, the
operating system, the application programs and the user such that: -

Basic Terms: -
1. Software: - Software is a set of programs (sequence of instructions) that allows the
users to perform a well-defined function or some specified tasks.
The software is made up of binary language (composed of ones and zeros), and for a
programmer writing the binary code would be a slow and tedious task. Therefore,
software programmers write the software program in various human-readable
languages such as Java, Python, C# (pronounced as C-Sharp), etc. and later use the
source code.

Types of Software: -
Software's are broadly classified into two types, i.e., System Software and Application
Software
a) System software: - System software is a computer program that helps the user to run
computer hardware or software and manages the interaction between them. They are
the first thing that gets loaded in the system's memory wherever you turn on your
computer. System software is also known as "low-level software" because the end-
users do not operate them.

Example: -
Operating System: -It is a group of software that handles the execution of programs
and offers general services for the application that runs over the computer. Like: -
Microsoft Windows, Macintosh, Linux, Unix etc.

Device Drivers: -The device driver is a type of software that operates or controls
some specific hardware devices linked to your system. Like: -BIOS Device Driver,
Display, USB, Printer Device Driver etc.

Language Translator: - A translator is a programming language processor that


modifies a computer program from one language to another. Like: - Compiler,
Interpreter, Assembler

Utility Software: -Utility software is developed to provide support in analysing,


optimizing, along configuring and maintaining a computer. Like: Norton and McAfee
Antivirus, WinRAR, WinZip etc.
b) Application Software: - Application programs or software applications are end-user
computer programs developed primarily to provide specific functionality to the user.
The applications programs assist the user in accomplishing numerous tasks such as
doing online research, completing notes, designing graphics, managing the finances,
watching a movie, writing documents, playing games, and many more.
Example: -
• Word Processor: - MS-Word, Google Docs
• Database Software: - MS-Access, Oracle, MySQL, MS-SQL Server
• Multimedia Software: - Adobe Photoshop, Windows Media Player, Windows
Movie Maker, Adobe Illustrator
• Social Media Apps: - Facebook, Twitter, Instagram, Snapchat, You Tube

2. Hardware: - Hardware refers to the physical and visible components of the system
such as a monitor, CPU, keyboard and mouse.

Hardware is further divided into four main categories:


• Input Devices: - Keyboard, Mouse, Scanner, Barcode Reader, Touchpad,
Touch Screen
• Output Devices: - Monitor, Speakers, Printer, Projection Display, Touch
Screen
• Storage Devices: - SSD, HDD, SD cards, USB Flash Drives
• Internal Components: - Processor, Motherboard, GPU, Backup Battery etc.
The software must be installed in the hardware to function properly and similarly, the
hardware must be present for the tasks to be performed. Both are interdependent, yet
they are also different from each other.

3. User Interface: - The User interface is an interface through which a human being
interacts or communicates with a device. You interact with an operating system
through a user interface, which allows the operating system to receive and interpret
instructions sent by the user. You need only send an instruction to the operating
system to perform a task, such as reading a file or printing a document.
User interface can be as simple as entering commands on a line or as complex as
selecting menus and icons on a desktop.

Types of User Interface: -


• Graphical User Interface
• Command Line Interface
• Menu-Driven User Interface
• Touch User Interface

Operating System lies in the category of system software.


Examples of the operating system are Windows, Linux, Mac OS, Unix etc.
________________________________________________________________________

Web-Designing-I: - Frontend vs Backend: -

Frontend and backend are the two most popular terms used in web-development.
Frontend: - this is termed as the part of website which is used by user to interact with it.
Everything that is included there for user interface on website. It is also termed as client-
side interface.
How the frontend is implemented?
HTML, CSS, JavaScript, react.js, jQuery etc.

Backend: - The part of the website which is used for the server side and the clients can not
see or interact with it. It stores and arranges the data. Example: - Data entered by user using
the Registration Form including user-id, password etc.
How the backend is implemented?
PHP, Java, Python, Node.js, C++, Django framework etc,

Database: - MySQL, MongoDB, PostgreSQL, Oracle

Structure of HTML Document: -

In HTML5, there is no need to specify the type of document using version of HTML like
there was in HTML4. You can simply use: -
<!doctype html>
How to start a tag: - <html>
How to end a tag: - </html>
The structure is as follows: -
<!doctype html>
<html>
<head>
<title>
</title>
</head>
<body>
------
------
</body>
</html>
Example: - To show the difference between <p> and <pre> tag: -

Output: -
Introduction to Linux: -
Linux is a fast and stable open-source operating system. Linux was developed in the early
1990s by Linus Torvalds, along with other programmers around the world. As an operating
system, Linux performs many of the same functions as Unix, Macintosh, Windows.
However, Linux is distinguished by its power and flexibility, along with being freely
available.
• Linux is a famous version of UNIX OS.
• History Facts: -
 Linux was developed by Linus Torvalds, while a student at the University of
Helsinki in Finland, with the help of hundreds of programmers scattered around
the world across the Internet.
 Linus took MINUX and UNIX like OS developed by Andrew Tannenbaum, as
inspiration.

Mascot of Linux: - Penguin, named as Tux

Features of Linux: -
The features of Linux are as follows: -
• Open-Source: - Source code is freely available on the internet. Anyone capable of
coding can contribute, modify, enhance and distribute the code to anyone and for any
purpose. It can be downloaded from internet completely for free. No registration fees,
no costs per user, free updates, and freely available source code, If you want to
change the behaviour of your system.

• Portable: - The kernel of Linux supports the installation of any type of hardware
environment.

• Shell/command Line interface: - 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.
• Graphical user interface: - Distros of Linux also support graphical user
interface where you have icons, through which you can interact with machine even if
you don’t know the commands in Linux.

• Multi-Programming: - Multi-programming increases CPU utilisation by


organising jobs (code and data) so that the CPU always has one to execute. The idea
is to keep multiple jobs in main memory. If one job gets occupied with IO, CPU can
be assigned to other job. The main objective is to maximize processor use.

• Multi-User: - More than one user can use the resources of the computer system. A
Multi-user operating system is a computer operating system which allows multiple
users to access the single system with one operating system on it.

• Multi-Tasking: - Multiple programs can be executed in the divided time slots.


Multitasking is the ability of an OS to execute more than one task simultaneously on a
CPU machine. These multiple tasks share common resources (like CPU and
memory). In multi-tasking systems, the CPU executes multiple jobs by switching
among them typically using a small-time quantum, and the switches occur so quickly
that the users feel like interact with each executing task at the same time. It is to
minimize the response time.

• Security: - Linux is more secure in comparison to other operating systems such as


Windows. Proper authentication is required to login the system. There is no
requirement of any anti-virus program in Linux. Viruses are incredibly rare in Linux.
 Linux based OS also have additional security patches that are updates
regularly to keep it safer.
 Password to individual user
 File accessing security: At each level, there are read, write and execute
permission for each file, which decides who can access the file.
 File encryption and decryption utilities: File encryption means file is in
unreadable format, so that even if someone succeeds in opening the file,
he’ll not be able to access the content.

• Flexible: - Linux provides a high range of flexibility as you can install only required
components. There is no need to install a full or complete suite. You can also keep
Linux file under multiple partitions so if one of them corrupts then there is no major
loss. You only need to repair that particular partition, not the complete file which is
not the case with other operating systems.

• Scalable: - A scalable system is one that can handle rapid changes to workloads
and user demands. Scalability is the measure of how well that system responds to
changes by adding or removing resources to meet demands.

• Customization: - A feature that gives a major advantage over other operating


systems is customization. You can customize any feature, add or delete any feature
according to your need as it is an open-source operating system. Not only this,
various wallpapers and attractive icon themes can be installed to give an amazing
look to your system.

• Various Distributions: - There are many distributions available also called


distros of Linux. It provides various choices to the users. You can select any distros
according to your needs. Some distros of Linux are Fedora, Ubuntu, Arch Linux,
Debian, Linux Mint and many more.

• Large Community Support: - Community support by excited users is made on


the web to help and solve the problem any other user who is facing any problem.
There are a lot of dedicated programmers there to help you out whenever and
wherever possible.

• Stability (Reliability): - Linux provides high stability also this is good advantage
i.e., it does not need to be rebooted after a short period of time. Your Linux system
rarely slows down or freezes. As in windows, you need to reboot your system after
installing or uninstalling an application or updating your software but this is not the
case with Linux. You can work without any disturbance on your Linux systems.

• Performance: - Linux provides high performance on various networks and


workstations. It allows a large number of users to work simultaneously and handles
them efficiently.

• Fast and easy installation: - Linux can be easily installed from the web and does not
require any prerequisites as it can run on any hardware, even on your oldest systems.
________________________________________________________________________
Linux Architecture: -

The Linux operating system's architecture mainly contains some of the components: -
1. Hardware
2. Kernel
3. Shell
4. Application Utilities
5. User

• Kernel: - Kernel is one of the core sections of an operating system. It is responsible


for each of the major actions of the OS.
Its main purpose is to ensure that all the jobs of the operating system are performed
properly. It is the core component of Operating System, interacts directly with
hardware, provides low level services to upper layer components.
Main jobs include: -

 Resource Management
 Memory Management
 Process Management
 File Management
 Date & time services
• Shell: - It is an interface between the user and the kernel. The kernel does not know
human language; hence the shell accepts the commands from the user from and
converts them into a language that the kernel can understand. The shell, or the
command interpreter as it is called, is the mediator, which interprets the commands
and conveys them to the kernel which ultimately executes them.
Two major parts of shell: -
1. Interpreter: reads out commands and works with kernel to execute them.
2. Programming capability that enables us to write a shell script. (Shell script is a file
that contains a collection of shell commands to perform a specific task. It is known
as a shell program.)
Types of shells: - Different programmers implemented the interpreter functioning in
different ways. So, there are various types of shells available like Bourne shell, C
shell, Korn shells, BASH shell (Bourne Again Shell).

 Bourne Shell - It is the primary UNIX command interpreter and was the first
major shell. It was developed by Steve Bourne at the AT&T Labs. This shell
was released in 1977 and was called “sh”. By default, it uses the prompt # for
the root user and $ for the non-root users.

 C Shell – The C shell, created by Bill Joy, has some special facilities that are
not available in Bourne Shell. It provides the facility of aliasing of commands
(Aliasing of commands means one can rename the lengthy commands) and
command history feature. By default, it uses the prompt hostname# for the
root user and hostname% for the non-root users. We can shift to this shell by
using “csh” command. The C shell got its name because its syntax and usage
is very similar to the C programming language. A compatible version of the
C shell, ‘tcsh’ is used in Linux.

 Korn Shell – The Korn shell was developed at AT&T Bell Labs by David
Korn, to improve the Bourne shell. It is denoted as ksh. The Korn shell is
essentially a superset of the Bourne shell. By default, it uses the prompt # for
the root user and $ for the non-root users.

 BASH (Bourne Again Shell) - It is a command language interpreter for the


Linux based system. It is a replacement of Bourne shell (sh). It was developed
under the GNU Project and written by Brian Fox and Chet Raney. Nowadays,
Bash is the default user shell of most of the Linux distributions.
 To check the type of default shell, type: - echo $SHELL
 To get the list of shells, type: - cat /etc/shells
• Hardware: - Physical components that collectively form a computer system.
Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
• System Utilities – These are built-in modules that are used by operating system to
perform the task assigned by the user. These are available in form of libraries that add
special capabilities to the operating system. Irrespective of whether the task is to
display date and time, find files, copy files or translate characters, among others, all
tasks are performed by utilities.
Some of the utilities are as: -
 date: to display date
 cal: to display calendar
 cp: to copy the files
 rm: to remove the files
 ls: to list all files and directory contents
• Application Program: - Linux Distributions come with several useful application
programs like word processors, Firefox web browser, thunderbird Mail etc.
_______________________________________________________________
UNIX Environment: -
UNIX is a multi-user and multiprocessing operating system that can be used in various
environment like stand-alone personal, time-sharing and client-server environment.
1. Stand-Alone Personal Environment: - It means that it can be installed on personal
computers and used as stand-alone machine.

2. Time-sharing Environment: - [Time- sharing or multi-tasking is the logical


extension of multi-programming] A time-sharing environment is an environment
in which a computer is connected to several terminals and all the terminals share the
resources of the central computer: CPU time, hard disk, and printer. The central
computer divides its CPU time into small time slices and serves each terminal in the
time slot assigned to it. Hence, each terminal waits for its time slot to get its jobs
processed by the central computer. Since all the tasks of the terminals are performed
by the central CPU, it is overloaded and hence its response is very poor.

3. Client-Server Environment: - This environment is better than the time-sharing


environment, as here, the central computer is not connected to dumb terminals but to
workstations or PC’s that have their individual processing power. As a result, all the
processing tasks are not assigned to the central computer but are divided among the
central computer and the connected workstations so that local and small tasks can be
processed at the workstations level, without bothering the central computer.
Here, Workstations, in this environment are known as clients and the central
computer is known as server.
Client: - Clients are the systems that make requests for information from the server
in order to complete the tasks. After getting the response, clients can terminate the
process or may do some other processing.
 Example: - Internet Browser works as a client application, which sends
request to the web server to get one HTML page.
Server: - the systems that serves the requests sent by the client system. Major
feature of the server is that they can provide their services to large number of clients
simultaneously.
 Example: - As soon as the Web Server gets the request from a browser, it
picks up the requested page and sends it back to that browser.
So, in the client-server environment, Main requirement is that they should be
connected to a network. Once a Connection is established, both sides can send and
receive information.
_______________________________________________________________
Accessing Linux System: -
Linux is a family of commands. However, even before we discuss how to perform a task
with the help of these commands, we need to first log in to the system. Let us see how this
is done.
To access and use the Linux system, you must carefully follow the start-up and shutdown
procedure. You can’t switch off the computer directly.

[If you are using Ubuntu, then a login window will appear like this. After entering password,
you will get shifted to Ubuntu.]
Ubuntu Desktop: -

LOGIN: Logging in to systems [To start your session]: -


The first step involved while working on the Linux system is to log in or identify ourselves
with the system. We should be assigned a user ID username and password by the
administrator, which would enable us to log in to the system. The user ID or username and
password (along with other information) are assigned while adding a new user to the system.
As soon as we switch on the Linux system, we are prompted to log in. The login prompt
appears as Login.

At the login prompt, we type the username (a unique name provided by the administrator).
After having typed the username, we are prompted for a password. The password entered
here is encrypted and does not appear such that: -

After successful login, you will be allowed to login the system and be navigated to home
directory, the directory in which personal files and settings are stored. In addition, a message
indicating when we last logged in, along with the shell prompt is displayed: -

On Shell, either “#” or “$” prompt is there.


• “#” for super-user
• “$” for ordinary user/regular users

Note that your prompt will be preceded by your username.


_______________________________________________________________
Logout the system: -
To end your session, you can either use logout or exit command. This will return you to
the login prompt and Linux waits for another user login: -
1. Using “logout” command: -

2. Using “exit” command: -

_______________________________________________________________
Shutting Down the Linux System: -
If you want to shut down the system, then you can shut down either by using commands or
by using GUI.

1. Using Commands: -
• To shut down the system immediately, type “shutdown -h now": -

• If we type “shutdown” without any argument, it will show the shutdown


schedule after one minute from the current time.

• To shut down after some minutes, specify the minutes in command: -

• To Shut down at a specific time by specifying the time, type


“shutdown <time> <message> or
“shutdown -h <time> <message>
Here, message is optional and “h” stands for “halt”, but this “h” is
overridden by “H” halt.
• To reboot after 1 minute, type “shutdown -r +1”: -

• Using “shutdown -P”, you can shout down like simple “shutdown” command
without arguments. Here, “p” stands for “poweroff”

• To cancel the schedule, type “shutdown -c”: -


Here, “c” stands for cancel.

• To shutdown immediately, you can use “poweroff” command too, but here,
you will require password, if used with sudo. After entering the password, the
system will shut down.
• Using “poweroff” without sudo will not require password.

• To reboot the system, use the following keystroke combination: -


Ctrl + Alt + Delete

2. Using GUI: -
• Right Click on the top-right corner. A pop-up menu will appear.
• Click on “Power Off/Log Out” drop-down option.
• Now, click on: -
 “Power Off” to shut down

 “Restart” to restart
 “Switch User” to switch the user
 “Log Out” to logout from your account

_______________________________________________________________
Linux Distributions: -
A Linux distribution is the customized version of Linux. In simple terms, it is a collection
of packages and applications grouped and pre-installed on standard Linux to meet specific
requirements. All Linux distributions with less or more customization use the same Linux
kernel.
Since all Linux distributions use the same Linux kernel at their core, no matter which Linux
distribution you use, you will get all features and functions of standard Linux across all
distributions. In other words, once you learned how to use or manage Linux of one
distribution, you can use the same skills and experiences to manage and use Linux of other
distributions.
Differences between distributions: -
• The first major difference between various Linux distributions is their target
audiences and systems. For example, some distributions are customized for
desktop systems, some distributions are customized for server systems, and
some distributions are customized for old machines, and so on. Usually,
distributions are designed for specific purposes or to provide an environment
to perform particular functions.
• The second major difference between distributions is the process of installing
and updating applications. Different distributions use different application
installation and management tools, called package management tools.
• The next big difference is how distributions provide supports and updates.
Some distributions are maintained by a community of volunteers while others
are maintained and supported by a commercial vendor. If a distribution is
maintained by a community, you will get all updates and supports free of cost.
But if a distribution is maintained by a commercial vendor, you may have to
pay for support services, updates, and maintenance.

Derived Linux distribution


When a new Linux distribution is created by using the source code of an existing Linux
distribution, it is known as derived Linux distribution. Linux is open-source software. It
means the source code of a Linux distribution is freely available for all.
Developers can view and use the source code of an existing Linux distribution to create their
distributions. These new derivations usually have their branding and features. For example,
CentOS Linux is derived from RHEL Linux.
Linux distributions are as follows: -
Some popular Linux distributions along with their features and target audiences are as
follows: -
1. Red Hat Enterprise Linux
Red Hat Enterprise Linux (RHEL) is the most popular commercially
supported Linux distribution. It is commonly used by corporate
organizations as server platforms due to its dedicated support services
and updates.
If you are looking for a Linux distro for a corporate organization or
you can afford the subscription fee, then Red Hat Enterprise Linux
should be your first choice. It not only provides guaranteed support
services and updates but also provides technical assistance as per-
requirement.
For software installation and management, it uses RPM and YUM
tools. In July 2019, Red Hat Inc. (the parent company of RHEL) was
acquired by IBM.

2. CentOS Linux
CentOS Linux is a derivation of RHEL. It uses all source codes of
RHEL without branding and artwork. If you want to use RHEL Linux
without paying a subscription fee for additional support, CentOS is the
best choice for you.
When Red Hat Inc. (IBM) releases a new version of RHEL or releases
an update of the existing version of RHEL, the developer community
of CentOS makes a clone copy of that release by using the same source
code and release that copy under the CentOS brand name.
CentOS Linux is the replica of RHEL Linux without brand name and
support. For support, you have to rely on the developer community of
the CentOS.
Many other distributions are also derived from RHEL such as
Scientific Linux and Oracle Linux. Unlike CentOS, these distributions
are not replicas of RHEL. These distributions use RHEL's source code
as the base platform and build their distributions.
3. Fedora Linux
Fedora project is sponsored by RHEL. Red Hat uses Fedora as a testing
ground to test its new features. Many features introduced in Fedora
usually make their way into the new version of RHEL. Red Hat does
not provide any support for Fedora Linux. For support, you have to
rely on the community of volunteers.
Fedora Linux is a good choice for instructors who provide Linux
training or for developers who develop software for RHEL Linux. It
allows instructors and developers to learn, understand, and use new
features even before they become available for all.
Since Fedora is a testing platform, it should not be used for commercial
use.

4. SUSE Linux
After Red Hat Enterprise Linux, SUSE is the next stable and popular
enterprise Linux for servers, and mainframes computers. SUSE is
developed and maintained by SUSE Software Solutions (Germany).
Just like Red Hat Linux, you can install, test, and use SUSE Linux
without paying a fee to SUSE. But if you need support and update,
then you have to purchase a paid subscription. SUSE Linux is suitable
for enterprise-size networks.

5. Debian Linux
The Debian Linux is a pure community based free Linux distro. It is
developed, managed, distributed, and updated by the largest volunteer-
based community. This project was started in 1993. For software
installation and management, it uses the dpkg packaging system.
Debian Linux is a good choice if you want a completely free Linux.
The Debian distribution commits toward freedom, openness, and
maintaining a focus on delivering what users want. Several popular
Linux distributions have been derived from Debian Linux.
Another main reason to choose this distro is that it has the largest
collection of software packages in its pool. It contains over 59000
packages, precompiled software bundled up in a nice format for easy
installation on your machine.
6. Gentoo Linux
Gentoo is also a community-based Linux distribution. The main
feature of this distribution is that it allows us to compile the entire
Linux from the source code on our computer. We can customize every
option and application that suit our hardware platform and meet our
requirement.
If you are a Linux developer or an advanced user and need a Linux that
contains only what you want, this is a perfect choice.
7. Ubuntu Linux
Ubuntu is based on the Debian Linux. Ubuntu is funded and supported
by Canonical Ltd. Before Ubuntu, Linux was known as the operating
system of developers or network administrators. It was not popular
among desktop or GUI users.
Ubuntu changed this trend by providing Windows-like GUI
environment and tools. Shortly after its launch, Ubuntu became the
most popular and used Linux distribution. If you are looking for an
easy-to-use and free Linux, then Ubuntu should be your first choice.
Ubuntu also offers its customized versions. These versions are known
as Ubuntu flavors. Each Ubuntu flavor is customized for different
requirements and purposes. To learn about these flavors in detail, you
can check the following tutorial.
Ubuntu Flavors: - Types of Ubuntu
A lot of other Linux distributions are also derived from Ubuntu such
as Linux Mint, elementary OS, Zorin OS, and Pop!_OS. The main
difference between Ubuntu-based Linux distributions and Ubuntu
flavors is that Ubuntu-based Linux distributions are developed and
maintained by third parties while Ubuntu flavors are developed and
maintained by the same team that develops and maintains the Ubuntu.

8. Arch Linux
Arch Linux is a lightweight and flexible distribution. This distribution
contains only essential and stable versions of the software. If you have
an old system and need a lightweight Linux distribution, this is a
perfect choice.

9. KNOPPIX Linux
KNOPPIX Linux is based on Debian Linux. This distribution
provides a compact and live version of Linux. You can install it on
any removable device such as CD, DVD, and USB drive. Once
installed, you can run KNOPPIX Linux from the removable device.
To use KNOPPIX Linux, boot the system from the removable device.
When you boot a system from the removable device that contains
KNOPPIX Linux, the KNOPPIX Linux automatically detects and
configures the hardware of the host computer.
After booting, you can use the KNOPPIX Linux just as it is installed
on the hard disk of that computer.
10.Kali Linux
Kali Linux is also based on Debian Linux. This Linux is mainly
customized for testing the security of network and system. This
distribution comes with a lot of tools that are used in hacking,
cracking, and testing networks and web applications.
If you are an ethical hacker or need a Linux for ethical hacking
purposes, this is the best choice for you. Frankly, there is no better
distribution than Kali Linux for ethical hacking purposes.

_______________________________________________________________
Comparison of Linux with other OS: -
1. Linux vs Unix: -
Linux: - Linux is an open-source operating system. This OS is supported on
several computer platforms and includes multiple software features that handle
computer resources, and allow you to do tasks. This operating system was
launched by Linus Torvalds at the University of Helsinki in 1991.
Unix: - Unix is a powerful and multitasking operating system that behaves like
a bridge between the user and the computer. It allows the user to perform specific
functions. This operating system was launched in 1960, and was released by
AT&T Bell Labs.
Features Linux Unix
Basic Linux is an open-source operating Unix is a powerful and multitasking
Definition system. This OS is supported on several operating system that behaves like a
computer platforms and includes bridge between the user and the
multiple software features that handle computer.
computer resources, and allow you to
do tasks.
Launched This operating system was launched by This operating system was
by Linus Torvalds at the University of launched in 1960 and released by
Helsinki in 1991. AT&T Bell Labs.
OS family It belongs to the Unix-like family. It belongs to the Unix family.
Available It is available in multiple languages. It is available in English.
in
Kernel It is monolithic. It can be microkernel, monolithic,
Type and hybrid.
Written in C and other programming languages. C and assembly language.
File system It supports more file systems than Unix It also supports less than Linux
support like ext2, ext3,ext4, jfs, xfs, btrfs etc. like jfs, gpfs, hfs, ufs zfs etc.
Usage It is used in several systems like Unix is majorly used on
desktop, smartphones, mainframes and workstations and servers.
servers.
Examples Some examples of Linux are: Fedora, Some examples of unix are IBM
Debian, Red Hat, Ubuntu, Android, AIX, Darwin, Solaris, HP-UX,
etc. macOS X, etc.
Security Linux provides higher security. Unix is also highly secured.
Price Linux is free and its corporate support Unix is not totally free. There are
is available at a price. some Unix versions that are free,
other than that UNIX is expensive.
Portable Linux is portable which can be Unix is not portable.
executed on different hard drives.
Default BASH is the default shell for Linux Bourne shell is the default shell for
shell Unix
Thread Fast Takes time
detection
Limitations • Standard edition of Linux is not • User Interface is not
available. friendly.
• Difficult to operate for new • Slow system performance.
users. • Files get destroyed with
• Many Windows-only programs typing mistakes.
can only be run on Linux with • Because the versions on
the help of a complex emulator. different machines differ
As an example. Microsoft Office slightly, there is a lack of
is a program that allows you to consistency.
create documents. • It does not support real time
• Linux has less reliable driver response time systems.
support, which can cause the
entire system to fail.

2. Linux vs Windows
Features Linux Windows
Open/Closed Linux is Open-source OS Windows is not Open-source OS.
source
Price It is free of cost. It is costly.
Case- It is case-sensitive. It is not case-sensitive
sensitive
Kernel type In Linux, monolithic kernel is used. Here, micro kernel is used.
Efficiency It is more efficient in comparison of It is less efficient.
windows.
Path Here, forward slash is used for Here, back slash is used for
Separator separating the directories. separating the directories.
Security Linux is more secure than Windows. Less secure than Linux.
Support Linux is widely used in hacking While windows does not provide
hacking purpose-based systems. much efficiency in hacking.
Naming Naming convention is case-sensitive In Windows, it is not allowed for
Conventions in Linux. Like, Hello and hello are two files to have same name in the
two different files in Linux. same folder.
Development By Linus Torvalds in 1991 By Microsoft Corporation in 1985
Usability Complicated installation procedure Easy to operate but takes time to
but can handle complex tasks easily. install.
Peripherals Peripherals (printers and keyboards) Peripherals (printers & keyboards)
are considered as files. are considered devices.
Written in C and Assembly Language C++ and Assembly Language
Reliable Highly reliable and secure Not more reliable and secure
_______________________________________________________________
Steps to install Ubuntu WSL on Windows 10/11: -

1. Open Microsoft Store in your PCs and search for “Ubuntu” in the search bar
there.

2. Click on the “Get” option. Let it get downloaded.


3. Now click on “Search” option given on Taskbar & search for “Turn Windows
features on or off”.
4. Now a window will appear with title “Windows Features”.

5. Select the checkbox “Windows Subsystem for Linux” and “Virtual Machine
Platform” and then “OK”.
6. After applying all the changes, hit “Restart now” to finish the process.
7. Now, After Downloading the “Ubuntu”, click on “Open”.
8. It’ll take some time to unpack the distro.

9. Then, it’ll prompt you to select language. Select “English”.

10.Then, a “Profile Setup” window will appear.

11. Click on “Done”.


12. Now open ubuntu power shell.
13. Now, WSL will require an update to its kernel component. Let’s download the
required package from the following link: -
https://aka.ms/wsl2kernel

Using this link, click on “WSL2 Linux kernel update package for x64
machines”, given on the page.

14.After downloading the package, install it by providing all the required


permissions.
15. Now, It’ll work properly, without any error.

Question bank: -
1. What do you mean by operating system. Explain Linux.
2. Explain features of Linux.
3. Explain architecture/structure of Linux.
4. Explain login and logout in Linux. Which particular commands are used for this
purpose?
5. How to add a new user in Linux Environment?
6. How to restart and shutdown the Linux?
7. What are the various types of environment in Linux?
8. Distinguish between following:
i) Linux and Unix
ii) Linux and Windows
9. What is meant by distribution of Linux? Explain various distributions of Linux in
detail? How are the distributions created?
10.Which components of Linux structure acts as an interpreter?
11.Explain various types of shells?
12.How to identify the default type of shell used?
13.How to get the list of all supported shells by the system?
14.Distinguish between multi-tasking and multi-programming.
15.Distinguish between stand-alone, time-sharing and client-server environment.

You might also like