SlideShare a Scribd company logo
1 of 32
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
UNIT I : BASICS OF LINUX OPERATING SYSTEM
Linux is one of popular version of UNIX operating System. It is open source as its source
code is freely available. It is free to use. Linux was designed considering UNIX
compatibility. Its functionality list is quite similar to that of UNIX.
Components of Linux System
Linux Operating System has primarily three components
 Kernel − Kernel is the core part of Linux. It is responsible for all major activities of
this operating system. It consists of various modules and it interacts directly with the
underlying hardware. Kernel provides the required abstraction to hide low level
hardware details to system or application programs.
 System Library − System libraries are special functions or programs using which
application programs or system utilities accesses Kernel's features. These libraries
implement most of the functionalities of the operating system and do not requires
kernel module's code access rights.
 System Utility − System Utility programs are responsible to do specialized,
individual level tasks.
Kernel Mode vs User Mode
Kernel component code executes in a special privileged mode called kernel mode with full
access to all resources of the computer. This code represents a single process, executes in
single address space and do not require any context switch and hence is very efficient and
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
fast. Kernel runs each processes and provides system services to processes, provides
protected access to hardware to processes.
Support code which is not required to run in kernel mode is in System Library. User
programs and other system programs works in User Mode which has no access to system
hardware and kernel code. User programs/ utilities use System libraries to access Kernel
functions to get system's low level tasks.
Architecture
The following illustration shows the architecture of a Linux system −
The architecture of a Linux System consists of the following layers −
 Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU
etc).
 Kernel − It is the core component of Operating System, interacts directly with
hardware, provides low level services to upper layer components.
 Shell − An interface to kernel, hiding complexity of kernel's functions from users.
The shell takes commands from the user and executes kernel's functions.
 Utilities − Utility programs that provide the user most of the functionalities of an
operating systems.
Linux History
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Evolution of Computer
In earlier days, computers were as big as houses or parks. So you can imagine how difficult it
was to operate them. Moreover, every computer has a different operating system which made
it completely worse to operate on them. Every software was designed for a specific purpose
and was unable to operate on other computer. It was extremely costly and normal people
neither can afford it nor can understand it.
Evolution of Unix
In 1969, a team of developers of Bell Labs started a project to make a common software for
all the computers and named it as 'Unix'. It was simple and elegant, used 'C' language instead
of assembly language and its code was recyclable. As it was recyclable, a part of its code now
commonly called 'kernel' was used to develop the operating system and other functions and
could be used on different systems. Also its source code was open source.
Initially, Unix was only found in large organizations like government, university, or larger
financial corporations with mainframes and minicomputers (PC is a microcomputer).
Unix Expansion
In eighties, many organizations like IBM, HP and dozen other companies started creating
their own Unix. It result in a mess of Unix dialects. Then in 1983, Richard Stallman
developed GNU project with the goal to make it freely available Unix like operating system
and to be used by everyone. But his project failed in gaining popularity. Many other Unix like
operating system came into existence but none of them was able to gain popularity.
Evolution of Linux
In 1991, Linus Torvalds a student at the university of Helsinki, Finland, thought to have a
freely available academic version of Unix started writing its own code. Later this project
became the Linux kernel. He wrote this program specially for his own PC as he wanted to use
Unix 386 Intel computer but couldn't afford it. He did it on MINIX using GNU C compiler.
GNU C compiler is still the main choice to compile Linux code but other compilers are also
used like Intel C compiler.
He started it just for fun but ended up with such a large project. Firstly he wanted to name it
as 'Freax' but later it became 'Linux'.
He published the Linux kernel under his own license and was restricted to use as
commercially. Linux uses most of its tools from GNU software and are under GNU
copyright. In 1992, he released the kernel under GNU General Public License.
Linux Today
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Today, supercomputers, smart phones, desktop, web servers, tablet, laptops and home
appliances like washing machines, DVD players, routers, modems, cars, refrigerators, etc use
Linux OS.
Linux Features
o Multiuser capability: Multiple users can access the same system resources like
memory, hard disk, etc. But they have to use different terminals to operate.
o Multitasking: More than one function can be performed simultaneously by dividing
the CPU time intelligently.
o Portability: Portability doesn't mean it is smaller in file size or can be carried in pen
drives or memory cards. It means that it support different types of hardware.
o Security: It provides security in three ways namely authenticating (by assigning
password and login ID), authorization (by assigning permission to read, write and
execute) and encryption (converts file into an unreadable format).
o Live CD/USB: Almost all Linux distros provide live CD/USB so that users can
run/try it without installing it.
o Graphical User Interface (X Window system): Linux is command line based OS
but it can be converted to GUI based by installing packages.
o Support's customized keyboard: As it is used worldwide, hence supports different
languages keyboards.
o Application support: It has its own software repository from where users can
download and install many applications.
o File System: Provides hierarchical file system in which files and directories are
arranged.
o Open Source: Linux code is freely available to all and is a community based
development project.
Why Use Linux
Linux is completely different from other operating systems in many ways.
o It is an open source OS which gives a great advantage to the programmers as they can
design their own custom operating systems.
o It gives you a lot of option of programs having some different features so you can
choose according to your need.
o A global development community look at different ways to enhance its security,
hence it is highly secured and robust so you don't need an anti virus to scan it
regularly. Companies like Google, Amazon and Facebook use linux in order to protect
their servers as it is highly reliable and stable.
o Above all you don't have to pay for software and server licensing to install Linux, its
absolutely free and you can install it on as many computers as you want.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
o Its completely trouble free operating system and don't have an issue with viruses,
malware and slowing down your computer.
Linux Bash
The Linux Bash is also known as '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. Nowadays, Bash is the default
user shell of most of the Linux distributions.
The Linux/Unix shell allows us to interact with the Linux system through the commands. It
let us invoke an executable file to create a running process. Moreover, it also allows us to
interact with the Linux file system. It is designed in such a way that we can perform all the
Linux operations through Bash.
The Bash is a command language interpreter as well as a programming language. It
supports variables, functions, and flow control, like other programming languages. It can
also read and execute the commands from a file, which is called a shell script.
It offers various functional improvements over Bourne Shell (sh) for both interactive and
programming use. Although many sh scripts can be run by Bash without any change. The
Bash contains the following improvements over sh:
o It provides command-line editing
o It contains unlimited size command history
o It provides Job Control
o It facilitates with Shell Functions and Aliases
o It provides the indexed arrays of unlimited size
o It contains integer arithmetic in any base from 2 to 64.
How to download Bash
It can be downloaded from the official GNU server via both HTTP
(http://ftp.gnu.org/gnu/bash/) and FTP (ftp://ftp.gnu.org/gnu/bash/ ) servers.
People often get confused between bash, shell, and shell script. Let's walk through shell and
scripting to clear a picture of bash, shell, and scripting.
What is Shell
If we are a new Linux user, and we open the terminal, it is assumed that we are well confused
as to what to do with it. Here the Shell comes in the role.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
The terminal contains the shell; it allows us to execute the commands to interact with the
system. We can perform various operations such as store and retrieve data, process
information, and various other simple as well as complex tasks.
To open the terminal, press CTRL+ALT+T keys. Perform some basic operations such
as date, cal, ls, and pwd to take a tour with it.
Consider the below image:
As we can see from the above image, the shell allows us to interact with the Linux system.
When we have executed the date and cal command, the shell interacts with the system and
retrieves data.
What is Scripting
Suppose we are required to execute some basic commands every day, for example above four
commands. Linux supports a feature called scripting that allows us to execute more than one
task at once. So, it is good to define a script rather than performing repetitive tasks.
To understand how to use Linux script, let's define a script in a combination of some tasks.
To define a script, create a file with a .sh extension. We are using the VI text editor.
However, any text editor can be used to define a script. Consider below command:
1. vi tasks.sh
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
The above command will open the vi editor in normal mode. Switch it to insert mode by
pressing ESC, and after that enter 'i' keys, enter your desired tasks. Every task should be
defined in a new line. Consider the below tasks:
1. date
2. cal
3. pwd
4. ls
After entering the tasks, press ESC and :wq! Keys to save and exit from the editor.
Now, make the created file as executable, use the chmod command with +x option as
follows:
1. chmod +x tasks.sh
We have created our first script. To execute the shell script, execute the file name by
predefining './ ' with the file name. Consider the below command:
1. ./task.sh
Consider the below output:
As we can see from the above output, by using the shell, we can automate the tasks. We can
use this whenever we need it. It can be used repeatedly any number of times.
Features of Bash
All the built-in command of the sh shell is available in Bash; moreover, it facilitates us with
many other features. Some key features of Bash are as follows:
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
o Shell Syntax: The shell syntax contains shell operations, quoting, and comments.
The shell operations are the basic operation of the shell. Quoting allows how to
remove the special meaning from characters, and comments are meant to specify the
comments.
o Shell commands: Shell commands are the types of commands that you can execute.
These commands can be simple commands, pipelines, lists, compound commands,
and more.
o Shell Functions: Shell functions are used to group commands by name. They are
executed as traditional commands. When we use the name of a shell function, the list
of commands associated with that is executed.
o Shell parameters: Basically, a parameter is an entity that stores value; it can be a
name, number, or special character. The shell parameters specify how the shell store
value. They can be a positional parameter or a special parameter. Positional
parameters are the shell's command-line arguments, and the special parameters are
denoted by a special character.
o Shell Expansions: Shell expansion is a technique that is used by Bash to expand the
parameters. Expansion is performed on the command line after the input has been
splitted into tokens.
o Redirections: It is a way to manage and control the input and output.
o Command execution: It decides how the system will react when we execute a
command.
o Shell Scripts: It is a text file that has shell commands and executes them when it is
used. Bash reads and executes the commands then exits.
Unix Vs Linux
Today Linux is in great demand. You can see the use of Linux everywhere. It's dominating
on our servers, desktop, smartphones and even used in some electrical devices like
refrigerators.
Some people think Unix and Linux as synonyms, but that's not true. Many operating systems
were developed to be like Unix but none of them got the popularity as Linux. Linux is the
clone of Unix. It has several features similar to Unix, still have some key differences. Before
Linux and Windows, computer world was dominated by Unix. Unix is a copyrighted name
and IBM AIX, HP-UX and Sun Solaris are only Unix operating system remained till date.
Difference between Linux and Unix
Comparison Linux Unix
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Definition It is an open-source operating
system which is freely
available to everyone.
It is an operating system
which can be only used by
its copyrighters.
Examples It has different distros like
Ubuntu, Redhat, Fedora, etc
IBM AIX, HP-UX and
Sun Solaris.
Users Nowadays, Linux is in great
demand. Anyone can use
Linux whether a home user,
developer or a student.
It was developed mainly
for servers, workstations
and mainframes.
Usage Linux is used everywhere
from servers, PC,
smartphones, tablets to
mainframes and
supercomputers.
It is used in servers,
workstations and PCs.
Cost Linux is freely
distributed,downloaded, and
distributed through magazines
also. And priced distros of
Linux are also cheaper than
Windows.
Unix copyright vendors
decide different costs for
their respective Unix
Operating systems.
Development As it is open source, it is
developed by sharing and
collaboration of codes by
world-wide developers.
Unix was developed by
AT&T Labs, various
commercial vendors and
non-profit organizations.
Manufacturer Linux kernel is developed by
the community of developers
from different parts of the
world. Although the father of
Linux, Linus Torvalds
oversees things.
Unix has three
distributions IBM AIX,
HP-UX and Sun Solaris.
Apple also uses Unix to
make OSX operating
system.
GUI Linux is command based but
some distros provide GUI
based Linux. Gnome and KDE
Initially it was command
based OS, but later
Common Desktop
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
are mostly used GUI. Environment was created.
Most Unix distributions
use Gnome.
Interface The default interface is BASH
(Bourne Again SHell). But
some distros have developed
their own interfaces.
It originally used Bourne
shell. But is also
compatible with other
GUIs.
File system
support
Linux supports more file
system than Unix.
It also supports file system
but lesser than Linux.
Coding Linux is a Unix clone,behaves
like Unix but doesn't contain
its code.
Unix contain a completely
different coding
developed by AT&T
Labs.
Operating
system
Linux is just the kernel. Unix is a complete
package of Operating
system.
Security It provides higher security.
Linux has about 60-100
viruses listed till date.
Unix is also highly
secured. It has about 85-
120 viruses listed till date
Error
detection and
solution
As Linux is open-
source,whenever a user post
any kind of threat, developers
from all over the world start
working on it. And hence, it
provides faster solution.
In Unix, users have to
wait for some time for the
problem to be resolved.
Linux vs. Windows
Linux vs. Windows has always been one of the most frequently asked questions related to the
operating system. Users often get confused about which one is better for them. There is
diversity between the users as most users prefer the graphical user interface (GUI) and most
command-line interface (CLI). There are many disagreements and acrimonious behavior
among users, and it seems that it will be forever.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
In this section, we will discuss the differences between Linux and Windows by considering
several parameters such as performance, usability, security, ease of use, and more to clear
a picture of using both operating systems. Further, we will see the advantages of Linux
over other operating systems such as Windows and Mac OS. This will help you to decide
which one is better for you.
Difference between Linux and Windows operating system
To understand the difference between Linux and Windows, let's see a brief introduction to
both operating systems. Later we will talk on their features and security options.
What is the Windows operating system?
Windows is a graphical operating system developed and marketed by Microsoft. It is also
referred to as Microsoft Windows. Several versions of Windows have been introduced in the
market; the current version is Windows 10. The first version of Windows was introduced
on November 20, 1985, as a graphical operating system for MS-DOS.
Microsoft Windows is a family of various operating systems. It comes with two versions, i.e.,
64 bit and 32 bit. It facilitates both client and server versions. The latest client version is
Windows 10, and the server version is Windows server 2019.
Windows is a straight forward and simple to use. Generally, it is designed for users having no
programming knowledge. So, mostly it is used for business and alternative industrial
purposes.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
What is a Linux operating system
Linux is an open-source operating system. As it is open-source, it is special and different
from other operating systems, which means that you can customize it by editing source
code. It provides programming as well as a graphical user interface. Linux is built by Linux
Torvalds because he wanted to create a free operating system kernel that anyone can use.
Linux is a collection of operating systems that are based on Linux kernel. The first version of
Linux was released in the year 1991. The Linux system is most commonly used for servers;
however, it is available in desktop versions as well.
Ubuntu, Devian, and Fedora are some popular Linux distributions. Also, we have SUSE
Linux Enterprise Server (SLES) and RedHat Enterprise Linux for the commercial
distribution of Linux. As it is open-source, we can modify the source code and make
variations in the operating system.
Let's discuss some features and parameters to understand the difference between both
operating systems:
o File System
Windows uses different drives such as C, D, E, and more, having some folders to store
files.
But Linux uses a tree structure to store and organize files. Linux file structure starts from
the root directory, and it is considered as a start point of the file system. It is represented by a
forward slash (/). In Linux, everything (Directories, devices, and files) is considered a file.
There are three types of files available in a Linux system.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
o General files
o Directory files
o Device files
The general file system of Unix is as follows:
General files: General files or ordinary files are files that contain images, text, or a program.
These files are in ASCII text or Binary format. The General files are the most common in any
Linux system.
Directory files: Directory files are the depository for other files. A directory can have a
subdirectory file within it. For Windows, we can understand them as folders.
Device files: Windows represents the external devices (Pendrives, hard drives, and CD-
ROM) as letters such as E: F: But, Linux represents devices as files, such as the hard drive's
partitions are represented as dev/sda1, dev/sda2, and more (depends upon the number of
partitions). All the device files take place within the directory /dev.
o Naming Conventions for file
Linux files are case sensitive; therefore, we can have two files having the same name; one in
upper case and other in lower case. Comparatively, the Windows files are not case sensitive;
we cannot have two files with the same name.
o Users
Windows supports four types of users:
o Administrator
o Standard
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
o Child
o Guest
Comparatively, Linux supports three types of users:
o Regular
o Administrative(root)
o Service
Regular User
In Linux, when we install ubuntu on our system, a regular account user is created. By default,
all our files are saved in the home directory (/home/). A regular user cannot access the other
user's directories.
Root User
Apart from the regular user account, a root user account is also created during installation.
The root account is also called as superuser as it can access the restricted files, install the
software and other utility, and has administrative rights. For installing the software or editing
the system files or any other administrative task, we need the root access. For general tasks
such as creating files, playing games, browsing the internet, we don't need the root access.
Service user
The Linux system is widely used as the server operating system. The leading service
providers such as Apache, Squid, email, and more have their service accounts to increase
security. Linux service user can allow or deny access to various resources depending on the
service type.
Note: The Ubuntu Desktop version does not have a service account, and the regular
accounts are called standard accounts.
o Home Directory
Linux OS has a separate home directory for a user. The files and directories created by a user
are stored under a particular home directory. A user cannot store the files under any other
user's directory, as it is not allowed to access the other user's directory. For example, the
home directory of a user 'Alex' is automatically created as "/home/alex/" at the time of
installation.
The Windows OS also has different home directories for different users. It is as "C:
documents or settings."
o Other Directories
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Linux systems have a tree structure to save the directories; comparatively, Windows uses
different drives to save the directories. In Windows, system and program files usually take
place in C drive. But in Linux, the system and program files take place in their specific
directory such as software files are stored in /bin, programs and device files are
in /dev, and boot files are stored in /boot directory.
o Kernel
The basic part of any operating system is its kernel. It interacts with hardware devices and
performs other functions such as process management, file handling, and more. Different
operating systems have different kernels.
Linux and Windows have a different kernel. The Linux kernel is monolithic, and it consumes
more running space. Comparatively, Windows uses the microkernel, which consumes less
running spaces. But, Windows running efficiency is less than Linux. The key difference
between Linux kernel and Windows kernel is that Windows is a commercial software while
Linux is open-source software.
o Pricing
Linux is an open-source operating system, so almost all the utilities and libraries are entirely
free. The GNU/Linux distribution can be simply downloaded for free. However, some
companies are providing paid support for their Linux distributions, but the underlying
software is still free.
Microsoft Windows licensed copy usually cost between $99.00 and $199.00. Microsoft
currently stops providing support for the earlier versions. The latest version, Windows 10, is
available at $139.
Let's focus some head to head comparison between Linux and Windows.
Parameter Linux Windows
Access Users can access the
source code of
kernel in Linux and
can alter the kernel
according to need.
Usually, users cannot access the
source code. However, members
of some groups can have access
to it.
Variety Linux has several
distributions that are
highly
Windows have fewer options to
customize.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
customizable.
Command-
line
The command line
usually referred
to as Terminal,
which is the most
useful tool of the
Linux system. It
used for
administration and
daily tasks. For the
end-users, it does
not look so
effective.
Windows also have a command
line, but it is not such effective as
a comparison to the Linux
terminal. Most users prefer the
GUI options for daily tasks.
Installation The Linux
installation process
is a bit complicated
to set up as it
requires many user
inputs. It takes less
time than Windows
to install.
Windows OS is easy to install
and set up on a machine; it
requires fewer user input options
during installation. However, it
takes more time to install as
compared to Linux.
Ease of use The Linux OS is
meant to be for the
technical user
because you must
have some exposure
to various Linux
commands. Users
may take more time
to be a handy user
of Linux. The
troubleshooting
process is also
complicated as
compared to
Windows.
Windows comes with simple and
rich GUI options, so it is easy to
use it. It can be simply used by
technical as well as non-technical
users. The troubleshooting
process is also much easy than
Linux.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Written in Linux is written
in assembly
language and C.
Windows is written
in C++ and assembly language.
Reliability Linux is highly
reliable and secure.
It has well-
established system
security, process
management, and
uptime.
Windows is not as much reliable
as Linux. However, now
Windows has improved reliability
but still has some security
weaknesses and system
instabilities.
Support Linux has a
good support as it
has a huge
community of user
forums and online
search.
Windows also provide good
support to its user. It provides
free as well as paid support. It has
an easily accessible online forum.
Update Linux provides full
control to its users
on updates. A user
can install the
update whenever
needed. Also, it
takes less time to
install an update.
Windows updates are annoying.
The updates will come at any
time and take too much time to
install. Sometimes, you power on
your machine, and updates are
automatically getting started.
Unfortunately, the user does not
have much control over updates.
Security Linux OS is more
secure than
Windows. It is hard
for the hackers and
attackers to find a
loophole in it. So,
Linux is hard to
breakthrough.
Windows is less secure than
Linux. Attackers primarily target
the Windows for malware and
virus. Windows is most
vulnerable without anti-virus.
License Linux is distributed
under
the GPL(GNU
Windows is distributed under
a Proprietary commercial
software license.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
General Public
License) license.
Linux Distributions (Distros)
Other operating systems like Microsoft combine each bit of codes internally and release it as
a single package. You have to choose from one of the version they offer.
But Linux is different from them. Different parts of Linux are developed by different
organizations.
Different parts include kernel, shell utilities, X server, system environment, graphical
programs, etc. If you want you can access the codes of all these parts and assemble them
yourself. But its not an easy task seeking a lot of time and all the parts has to be assembled
correctly in order to work properly.
From here on distribution (also called as distros) comes into the picture. They assemble all
these parts for us and give us a compiled operating system of Linux to install and use.
Linux Distributions List
There are on an average six hundred Linux distributors providing different features. Here,
we'll discuss about some of the popular Linux distros today.
1) Ubuntu
It came into existence in 2004 by Canonical and quickly became popular. Canonical wants
Ubuntu to be used as easy graphical Linux desktop without the use of command line. It is the
most well known Linux distribution. Ubuntu is a next version of Debian and easy to use for
newbies. It comes with a lots of pre-installed apps and easy to use repositories libraries.
Earlier, Ubuntu uses GNOME2 desktop environment but now it has developed its own unity
desktop environment. It releases every six months and currently working to expand to run on
tablets and smartphones.
2) Linux Mint
Mint is based on Ubuntu and uses its repository software so some packages are common in
both.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Earlier it was an alternative of Ubuntu because media codecs and proprietary software are
included in mint but was absent in Ubuntu. But now it has its own popularity and it uses
cinnamon and mate desktop instead of Ubuntu's unity desktop environment.
3) Debian
Debian has its existence since 1993 and releases its versions much slowly then Ubuntu and
mint.
This makes it one of the most stable Linux distributor.
Ubuntu is based on Debian and was founded to improve the core bits of Debian more quickly
and make it more user friendly. Every release name of Debian is based on the name of the
movie Toy Story.
4) Red Hat Enterprise / CentOS
Red hat is a commercial Linux distributor. There products are red hat enterprise Linux
(RHEL) and Fedora which are freely available. RHEL is well tested before release and
supported till seven years after the release, whereas, fedora provides faster update and
without any support.
Red hat uses trademark law to prevent their software from being redistributed. CentOS is a
community project that uses red hat enterprise Linux code but removes all its trademark and
make it freely available. In other words, it is a free version of RHEL and provide a stable
platform for a long time.
5) Fedora
It is a project that mainly focuses on free software and provides latest version of software. It
doesn't make its own desktop environment but used 'upstream' software. By default it has
GNOME3 desktop environment. It is less stable but provides the latest stuff.
Choosing a Linux Distro
Distribution Why To Use
UBuntu It works like Mac OS and easy to use.
Linux mint It works like windows and should be use by new comers.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Debian It provides stability but not recommended to a new user.
Fedora If you want to use red hat and latest software.
Red hat enterprise To be used commercially.
CentOS If you want to use red hat but without its trademark.
OpenSUSE It works same as Fedora but slightly older and more stable.
Arch Linux It is not for the beginners because every package has to be
installed by yourself.
Linux Licensing
Linus Torvalds has given linux kernel license to GNU General Public License (GPL) version
2. GNU make sure that any software source code licensed under it have to make originating
source code open and freely availble to all its users. Here, freely doesn't mean by cost but it
means that it is freely available to users to distribute and modify the code.
There is the third version of GNU, GNU Lesser General Public License (LGPL) version 3.
But it imposes some more permissions on the license. Torvalds doesn't like some provisions
in version 3 and have announced that linux kernel will not come under version 3.
Linux Set Environment Variable
The environment variables are dynamic values that are stored within a system and used by
applications launched in shells or sub-shells. These variables have a name and their respected
value. The environment variable customizes the system performance and the behavior of an
application.
The environment is the track for a computer application to interact with the system. The
environment variable can have information about the default applications of the system, the
system locale, the path of the executable file and the keyboard layout setting, and more. The
environment variable makes an app available as per the system.
Common Environment Variables
Some standard environment variables are as follows:
o PATH
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
This variable contains a list of directories in which our system looks for files. It separates
directories by a (:) colon.
o USER
This variable holds the username.
o HOME
This variable holds the default path to the user's home directory.
o EDITOR
This variable contains the path to the specified editor.
o UID
This variable contains the path to the user's unique id.
o TERM
This variable contains the path to the default terminal emulator.
o SHELL
This variable contains the path to the default shell that is being used by the user.
o ENV
This variable displays all the environment variable.
How to set Environment Variable in Linux?
There are multiple commands in Linux that allow us to set and create the environment
variable.
Use the export command to set a new environment variable.
To create a new variable, use the export command followed by a variable name and its value.
Syntax:
1. export NAME=VALUE
To create a new variable say new_variable, execute the command as follows:
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
1. export new_variable=10
The echo command is used to display the variable:
1. echo new_variable
To display the value of the variable, use the $ symbol before the variable name:
1. echo $new_variable
Consider the below output:
To set Java Environment Variable, execute the command as follows:
1. export PATH=$PATH:/home/jdk1.8/bin/
We can also create a user to define a variable by directly declaring it on the terminal.
If we want to create a variable new_variable2, we can create it as follows:
1. new_variable2=100
Consider the below output:
Accessing the value of Environment Variable
To access the value of a variable, execute the echo command as follows:
1. echo $variable name
Note: The variables are case sensitive; we cannot use any variable name 'new_variable' as
'New_variable.'
The env command
The env command is used to display all the available variables in the system.
1. env
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Output:
SHELL=/bin/bash
SESSION_MANAGER=local/javatpoint-GB-BXBT-2807:@/tmp/.ICE-
unix/1458,unix/javatpoint-GB-BXBT-2807:/tmp/.ICE-unix/1458
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
XDG_MENU_PREFIX=gnome-
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GTK_IM_MODULE=ibus
LANGUAGE=en_IN:en
QT4_IM_MODULE=ibus
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
GNOME_SHELL_SESSION_MODE=ubuntu
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
XMODIFIERS=@im=ibus
DESKTOP_SESSION=ubuntu
SSH_AGENT_PID=1362
GTK_MODULES=gail:atk-bridge
PWD=/home/javatpoint
LOGNAME=javatpoint
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=x11
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
XAUTHORITY=/run/user/1000/gdm/Xauthority
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
WINDOWPATH=2
HOME=/home/javatpoint
USERNAME=javatpoint
IM_CONFIG_PHASE=1
LANG=en_IN
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd
=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:e
x=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;
31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:
*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;3
1:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.
rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace
=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=
01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.
gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:
*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:
*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.n
uv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fl
i=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=0
1;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=0
0;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=
00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=ubuntu:GNOME
VTE_VERSION=5802
GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/dc6e48ed_7868_43d5_a086
_fd6d6a90a74a
INVOCATION_ID=fadf556d1cf5422ea55b247bf57c3c99
MANAGERPID=1252
CLUTTER_IM_MODULE=ibus
GJS_DEBUG_OUTPUT=stderr
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
TERM=xterm-256color
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
LESSOPEN=| /usr/bin/lesspipe %s
USER=javatpoint
GNOME_TERMINAL_SERVICE=:1.216
DISPLAY=:0
SHLVL=1
QT_IM_MODULE=ibus
XDG_RUNTIME_DIR=/run/user/1000
JOURNAL_STREAM=9:35179
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/
snap/bin
GDMSESSION=ubuntu
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
_=/usr/bin/env
javatpoint@javatpoint-GB-BXBT-2807:~$
Removing an Environment Variable
By removing an environment variable we can remove all existing component of particular
variable.
To remove an environment variable, execute the unset command followed by variable name:
1. unset variable name
The above command will delete the specified variable and its components from the system.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
To remove a variable new_variable from the system, execute the command as follows:
1. unset new_variable
Consider the below output:
Linux Set Command
Linux set command is used to set and unset certain flags or settings within the shell
environment. These flags and settings determine the behavior of a defined script and help in
executing the tasks without facing any issue. The values of shell attributes and parameters
can be changed or displayed by using the set command.
Syntax:
1. set [options]
To know about how to set the environment variable in Linux, visit Here.
Options: The supported options by the set command are as following:
o -a: It is used to mark variables that are modified or created for export.
o -b: It is used to notify of job termination immediately.
o -e: It is used to exit immediately if a command exits with a non-zero status.
o -f: It is used to disable the file name generation (globbing).
o -h: It is used to save the location of commands where they looked up.
o -k: It is used to place all assignment arguments in the environment variable of a
command, except those that precede the command name.
o -m: It is used to enable Job control.
o -n: It is used to read commands.
o -o: It is used for option-name.
o -p: It is used to disable the processing of the '$ENV' file and import shell functions. It
is turned on whenever the real and effective user ids do not match. Turning off this
option may cause the working uid and gid to be set as the authorized uid and gid.
o -t: It is used to exit from the command after executing one command.
o -u: It is used to treat unset variables as an error when substituting.
o -v: It is used to print shell input lines.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
o -x: It is used to print commands and their arguments in a sequential way (as they are
executed).
o -B: It is used to perform brace expansion by the Shell.
o -C: It is used to disallow existing regular files to be overwritten by redirection of
output.
o -E: It is used if the ERR trap is inherited by the shell functions.
o -H: It is used to enable style history substitution. By default, it is on when the shell is
interactive.
o -P: It is used if we do not want to follow symbolic links when executing commands.
o -T: If this flag is set, the DEBUG trap is inherited by the shell functions.
Note: To turn off the above flags, use the '+' rather than '-' symbol.
To better understand the set command, let's see a brief introduction of the shell variable:
Shell Variable
A variable is a character string that can hold a value. The assigned value could be anything
such as number, filename, text, or any other data type. It is just like a pointer to the actual
data. The shell allows us to create, delete, and assign variables.
The variable name can have any letters, numbers, or underscore (_) character. We cannot
have the characters such as "! *, or -", because these special characters have other meanings
for the shell. According to Unix naming convention, the Unix shell variable must have their
names in UPPERCASE.
Examples of the set command
Turn debugging information on or off.
The '-x' option is used with the set command to show command and their arguments. It is
useful for debugging the shell script.
Execute the following command:
To turn on the debugging information:
1. set -x
To turn off the debugging information:
1. set +x
Disable Bash's default behavior.
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
To disable the default behavior of Bash, execute the command as follows:
1. set -C
Stop a script immediately.
To stop a script immediately, execute the following command:
1. set -e
Getting Help
If you get stuck during the use of the set command, you can access the help documentation
from your terminal. To access the help manual, execute the below command:
1. set --help
Linux export Command
The export command is a built-in utility of Linux Bash shell. It is used to ensure the
environment variables and functions to be passed to child processes. It does not affect the
existing environment variable.
Environment variables are set when we open a new shell session. At any time, if we change
any variable value, the shell has no way to select that change. The export command allows us
to update the current session about the changes that have been made to the exported variable.
We do not need to wait to start a new shell session.
Syntax:
1. export [-f] [-n] [name[=value] ...] or export -p
Let's have a look at various examples of the export command:
Example1: The export command without any argument
The basic export command will display all the exported environment variables of your
system. It is executed as follows:
1. export
Consider the below snap of output:
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Example2: Display all exported variable on current shell
To display all the exported environment variable of the current shell, execute the command
with -p option as follows:
1. export -p
Consider the below snap of output:
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Example3: Using export with functions
To use a function with the export command, use the -f option. If we do not use this option, it
will be considered as a variable, not function.
Syntax:
1. export -f function_name
We are exporting a function 'name' as follows:
1. name() { echo "Javatpoint";}
To export the above function, execute the command as follows:
1. export -f name
Now, invoke the bash shell to execute the function:
1. bash
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
To call the function, enter the function name:
1. name
Consider the below output:
let's create another function 'hello,' execute the command as follows:
1. function hello
2. > {
3. > echo hello, welcome to javatpoint
4. > }
To export the above function, execute the command as follows:
1. export -f hello
Consider the below output:
Example4: Assign a value before exporting a function or variable:
The export command allows us to assign a value before exporting a function. Consider the
below command:
1. export name[=value]
For example, assign a value to a variable as follows:
1. a=5
now export it as:
1. export a
we can verify the assignment by using the printenv command as follows:
1. printenv a
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India
Consider the below output:
Example5: Set vim as default editor:
The vim editor is the most widely used text editor for the Linux systems. We can set the vim
as default text editor by using the export command.
To set the vim as a default text editor, execute the following command:
1. export EDITOR=/usr/bin/vim
2. export | grep EDITOR
The above commands will not show any confirmation. Consider the below output:
Example6: Set an environment variable
To create a new variable, use the export command followed by a variable name and its value.
Syntax:
1. export NAME=VALUE
To create a new variable, 'sys,' execute the command as follows:
1. export sys=50
The echo command is used to display the variable:
1. echo sys
To display the value of the variable, use the $ symbol before the variable name
1. echo $sys
Consider the below output:
Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous),
Vellore, TamilNadu, India

More Related Content

Similar to UNIT I LINUX.docx

Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system pptAchyut Sinha
 
Introduction to unix (1).pptx
Introduction to unix (1).pptxIntroduction to unix (1).pptx
Introduction to unix (1).pptxvirat834293
 
Linux programming lecture_notes
Linux programming lecture_notesLinux programming lecture_notes
Linux programming lecture_notesIMRAN KHAN
 
Overview_Linux ppt
Overview_Linux pptOverview_Linux ppt
Overview_Linux pptMU
 
Programming and problem solving 3
Programming and problem solving 3Programming and problem solving 3
Programming and problem solving 3sushruth kamarushi
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in LinuxDr.YNM
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linuxsureskal
 
Linux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxLinux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxbemnitekalegn
 
Linux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and TroubleshootingLinux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and TroubleshootingJérôme Kehrli
 
linux os-basics,Devops training in Hyderabad
linux os-basics,Devops training in Hyderabadlinux os-basics,Devops training in Hyderabad
linux os-basics,Devops training in HyderabadDevops Trainer
 
Intro tounix
Intro tounixIntro tounix
Intro tounixdjprince
 
Linux Presentation
Linux PresentationLinux Presentation
Linux PresentationNaiyan Noor
 

Similar to UNIT I LINUX.docx (20)

Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system ppt
 
Introduction to unix (1).pptx
Introduction to unix (1).pptxIntroduction to unix (1).pptx
Introduction to unix (1).pptx
 
Linux
LinuxLinux
Linux
 
Linux programming lecture_notes
Linux programming lecture_notesLinux programming lecture_notes
Linux programming lecture_notes
 
Linux Operating System
Linux Operating SystemLinux Operating System
Linux Operating System
 
Overview_Linux ppt
Overview_Linux pptOverview_Linux ppt
Overview_Linux ppt
 
Programming and problem solving 3
Programming and problem solving 3Programming and problem solving 3
Programming and problem solving 3
 
Linux technology
Linux technologyLinux technology
Linux technology
 
UNIT II-Programming in Linux
UNIT II-Programming in LinuxUNIT II-Programming in Linux
UNIT II-Programming in Linux
 
Ch1-Unix.pptx
Ch1-Unix.pptxCh1-Unix.pptx
Ch1-Unix.pptx
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
IntroToUnix.ppt
IntroToUnix.pptIntroToUnix.ppt
IntroToUnix.ppt
 
Linux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxLinux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptx
 
Linux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and TroubleshootingLinux and Java - Understanding and Troubleshooting
Linux and Java - Understanding and Troubleshooting
 
linux os-basics,Devops training in Hyderabad
linux os-basics,Devops training in Hyderabadlinux os-basics,Devops training in Hyderabad
linux os-basics,Devops training in Hyderabad
 
Linux
LinuxLinux
Linux
 
Intro tounix
Intro tounixIntro tounix
Intro tounix
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Intro to linux
Intro to linuxIntro to linux
Intro to linux
 
Module1
Module1Module1
Module1
 

More from BhuvanaR13

CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfBhuvanaR13
 
Linux File System.docx
Linux File System.docxLinux File System.docx
Linux File System.docxBhuvanaR13
 
networktopology-final.pptx
networktopology-final.pptxnetworktopology-final.pptx
networktopology-final.pptxBhuvanaR13
 
UNIT III_DCN.pdf
UNIT III_DCN.pdfUNIT III_DCN.pdf
UNIT III_DCN.pdfBhuvanaR13
 
UNIT 2_DCN-converted.pdf
UNIT 2_DCN-converted.pdfUNIT 2_DCN-converted.pdf
UNIT 2_DCN-converted.pdfBhuvanaR13
 
UNIT I_DCN.pdf
UNIT I_DCN.pdfUNIT I_DCN.pdf
UNIT I_DCN.pdfBhuvanaR13
 
INTRODUCTION TO MOBILE COMPUTING.pptx
INTRODUCTION TO MOBILE COMPUTING.pptxINTRODUCTION TO MOBILE COMPUTING.pptx
INTRODUCTION TO MOBILE COMPUTING.pptxBhuvanaR13
 
VB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptVB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptBhuvanaR13
 
VB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.pptVB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.pptBhuvanaR13
 
VB6_OBJECTS AND GRAPHICS.ppt
VB6_OBJECTS AND GRAPHICS.pptVB6_OBJECTS AND GRAPHICS.ppt
VB6_OBJECTS AND GRAPHICS.pptBhuvanaR13
 

More from BhuvanaR13 (10)

CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
 
Linux File System.docx
Linux File System.docxLinux File System.docx
Linux File System.docx
 
networktopology-final.pptx
networktopology-final.pptxnetworktopology-final.pptx
networktopology-final.pptx
 
UNIT III_DCN.pdf
UNIT III_DCN.pdfUNIT III_DCN.pdf
UNIT III_DCN.pdf
 
UNIT 2_DCN-converted.pdf
UNIT 2_DCN-converted.pdfUNIT 2_DCN-converted.pdf
UNIT 2_DCN-converted.pdf
 
UNIT I_DCN.pdf
UNIT I_DCN.pdfUNIT I_DCN.pdf
UNIT I_DCN.pdf
 
INTRODUCTION TO MOBILE COMPUTING.pptx
INTRODUCTION TO MOBILE COMPUTING.pptxINTRODUCTION TO MOBILE COMPUTING.pptx
INTRODUCTION TO MOBILE COMPUTING.pptx
 
VB6_INTRODUCTION.ppt
VB6_INTRODUCTION.pptVB6_INTRODUCTION.ppt
VB6_INTRODUCTION.ppt
 
VB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.pptVB_ERROR CONTROL_FILE HANDLING.ppt
VB_ERROR CONTROL_FILE HANDLING.ppt
 
VB6_OBJECTS AND GRAPHICS.ppt
VB6_OBJECTS AND GRAPHICS.pptVB6_OBJECTS AND GRAPHICS.ppt
VB6_OBJECTS AND GRAPHICS.ppt
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 

Recently uploaded (20)

LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 

UNIT I LINUX.docx

  • 1. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India UNIT I : BASICS OF LINUX OPERATING SYSTEM Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. Its functionality list is quite similar to that of UNIX. Components of Linux System Linux Operating System has primarily three components  Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs.  System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implement most of the functionalities of the operating system and do not requires kernel module's code access rights.  System Utility − System Utility programs are responsible to do specialized, individual level tasks. Kernel Mode vs User Mode Kernel component code executes in a special privileged mode called kernel mode with full access to all resources of the computer. This code represents a single process, executes in single address space and do not require any context switch and hence is very efficient and
  • 2. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India fast. Kernel runs each processes and provides system services to processes, provides protected access to hardware to processes. Support code which is not required to run in kernel mode is in System Library. User programs and other system programs works in User Mode which has no access to system hardware and kernel code. User programs/ utilities use System libraries to access Kernel functions to get system's low level tasks. Architecture The following illustration shows the architecture of a Linux system − The architecture of a Linux System consists of the following layers −  Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).  Kernel − It is the core component of Operating System, interacts directly with hardware, provides low level services to upper layer components.  Shell − An interface to kernel, hiding complexity of kernel's functions from users. The shell takes commands from the user and executes kernel's functions.  Utilities − Utility programs that provide the user most of the functionalities of an operating systems. Linux History
  • 3. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Evolution of Computer In earlier days, computers were as big as houses or parks. So you can imagine how difficult it was to operate them. Moreover, every computer has a different operating system which made it completely worse to operate on them. Every software was designed for a specific purpose and was unable to operate on other computer. It was extremely costly and normal people neither can afford it nor can understand it. Evolution of Unix In 1969, a team of developers of Bell Labs started a project to make a common software for all the computers and named it as 'Unix'. It was simple and elegant, used 'C' language instead of assembly language and its code was recyclable. As it was recyclable, a part of its code now commonly called 'kernel' was used to develop the operating system and other functions and could be used on different systems. Also its source code was open source. Initially, Unix was only found in large organizations like government, university, or larger financial corporations with mainframes and minicomputers (PC is a microcomputer). Unix Expansion In eighties, many organizations like IBM, HP and dozen other companies started creating their own Unix. It result in a mess of Unix dialects. Then in 1983, Richard Stallman developed GNU project with the goal to make it freely available Unix like operating system and to be used by everyone. But his project failed in gaining popularity. Many other Unix like operating system came into existence but none of them was able to gain popularity. Evolution of Linux In 1991, Linus Torvalds a student at the university of Helsinki, Finland, thought to have a freely available academic version of Unix started writing its own code. Later this project became the Linux kernel. He wrote this program specially for his own PC as he wanted to use Unix 386 Intel computer but couldn't afford it. He did it on MINIX using GNU C compiler. GNU C compiler is still the main choice to compile Linux code but other compilers are also used like Intel C compiler. He started it just for fun but ended up with such a large project. Firstly he wanted to name it as 'Freax' but later it became 'Linux'. He published the Linux kernel under his own license and was restricted to use as commercially. Linux uses most of its tools from GNU software and are under GNU copyright. In 1992, he released the kernel under GNU General Public License. Linux Today
  • 4. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Today, supercomputers, smart phones, desktop, web servers, tablet, laptops and home appliances like washing machines, DVD players, routers, modems, cars, refrigerators, etc use Linux OS. Linux Features o Multiuser capability: Multiple users can access the same system resources like memory, hard disk, etc. But they have to use different terminals to operate. o Multitasking: More than one function can be performed simultaneously by dividing the CPU time intelligently. o Portability: Portability doesn't mean it is smaller in file size or can be carried in pen drives or memory cards. It means that it support different types of hardware. o Security: It provides security in three ways namely authenticating (by assigning password and login ID), authorization (by assigning permission to read, write and execute) and encryption (converts file into an unreadable format). o Live CD/USB: Almost all Linux distros provide live CD/USB so that users can run/try it without installing it. o Graphical User Interface (X Window system): Linux is command line based OS but it can be converted to GUI based by installing packages. o Support's customized keyboard: As it is used worldwide, hence supports different languages keyboards. o Application support: It has its own software repository from where users can download and install many applications. o File System: Provides hierarchical file system in which files and directories are arranged. o Open Source: Linux code is freely available to all and is a community based development project. Why Use Linux Linux is completely different from other operating systems in many ways. o It is an open source OS which gives a great advantage to the programmers as they can design their own custom operating systems. o It gives you a lot of option of programs having some different features so you can choose according to your need. o A global development community look at different ways to enhance its security, hence it is highly secured and robust so you don't need an anti virus to scan it regularly. Companies like Google, Amazon and Facebook use linux in order to protect their servers as it is highly reliable and stable. o Above all you don't have to pay for software and server licensing to install Linux, its absolutely free and you can install it on as many computers as you want.
  • 5. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India o Its completely trouble free operating system and don't have an issue with viruses, malware and slowing down your computer. Linux Bash The Linux Bash is also known as '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. Nowadays, Bash is the default user shell of most of the Linux distributions. The Linux/Unix shell allows us to interact with the Linux system through the commands. It let us invoke an executable file to create a running process. Moreover, it also allows us to interact with the Linux file system. It is designed in such a way that we can perform all the Linux operations through Bash. The Bash is a command language interpreter as well as a programming language. It supports variables, functions, and flow control, like other programming languages. It can also read and execute the commands from a file, which is called a shell script. It offers various functional improvements over Bourne Shell (sh) for both interactive and programming use. Although many sh scripts can be run by Bash without any change. The Bash contains the following improvements over sh: o It provides command-line editing o It contains unlimited size command history o It provides Job Control o It facilitates with Shell Functions and Aliases o It provides the indexed arrays of unlimited size o It contains integer arithmetic in any base from 2 to 64. How to download Bash It can be downloaded from the official GNU server via both HTTP (http://ftp.gnu.org/gnu/bash/) and FTP (ftp://ftp.gnu.org/gnu/bash/ ) servers. People often get confused between bash, shell, and shell script. Let's walk through shell and scripting to clear a picture of bash, shell, and scripting. What is Shell If we are a new Linux user, and we open the terminal, it is assumed that we are well confused as to what to do with it. Here the Shell comes in the role.
  • 6. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India The terminal contains the shell; it allows us to execute the commands to interact with the system. We can perform various operations such as store and retrieve data, process information, and various other simple as well as complex tasks. To open the terminal, press CTRL+ALT+T keys. Perform some basic operations such as date, cal, ls, and pwd to take a tour with it. Consider the below image: As we can see from the above image, the shell allows us to interact with the Linux system. When we have executed the date and cal command, the shell interacts with the system and retrieves data. What is Scripting Suppose we are required to execute some basic commands every day, for example above four commands. Linux supports a feature called scripting that allows us to execute more than one task at once. So, it is good to define a script rather than performing repetitive tasks. To understand how to use Linux script, let's define a script in a combination of some tasks. To define a script, create a file with a .sh extension. We are using the VI text editor. However, any text editor can be used to define a script. Consider below command: 1. vi tasks.sh
  • 7. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India The above command will open the vi editor in normal mode. Switch it to insert mode by pressing ESC, and after that enter 'i' keys, enter your desired tasks. Every task should be defined in a new line. Consider the below tasks: 1. date 2. cal 3. pwd 4. ls After entering the tasks, press ESC and :wq! Keys to save and exit from the editor. Now, make the created file as executable, use the chmod command with +x option as follows: 1. chmod +x tasks.sh We have created our first script. To execute the shell script, execute the file name by predefining './ ' with the file name. Consider the below command: 1. ./task.sh Consider the below output: As we can see from the above output, by using the shell, we can automate the tasks. We can use this whenever we need it. It can be used repeatedly any number of times. Features of Bash All the built-in command of the sh shell is available in Bash; moreover, it facilitates us with many other features. Some key features of Bash are as follows:
  • 8. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India o Shell Syntax: The shell syntax contains shell operations, quoting, and comments. The shell operations are the basic operation of the shell. Quoting allows how to remove the special meaning from characters, and comments are meant to specify the comments. o Shell commands: Shell commands are the types of commands that you can execute. These commands can be simple commands, pipelines, lists, compound commands, and more. o Shell Functions: Shell functions are used to group commands by name. They are executed as traditional commands. When we use the name of a shell function, the list of commands associated with that is executed. o Shell parameters: Basically, a parameter is an entity that stores value; it can be a name, number, or special character. The shell parameters specify how the shell store value. They can be a positional parameter or a special parameter. Positional parameters are the shell's command-line arguments, and the special parameters are denoted by a special character. o Shell Expansions: Shell expansion is a technique that is used by Bash to expand the parameters. Expansion is performed on the command line after the input has been splitted into tokens. o Redirections: It is a way to manage and control the input and output. o Command execution: It decides how the system will react when we execute a command. o Shell Scripts: It is a text file that has shell commands and executes them when it is used. Bash reads and executes the commands then exits. Unix Vs Linux Today Linux is in great demand. You can see the use of Linux everywhere. It's dominating on our servers, desktop, smartphones and even used in some electrical devices like refrigerators. Some people think Unix and Linux as synonyms, but that's not true. Many operating systems were developed to be like Unix but none of them got the popularity as Linux. Linux is the clone of Unix. It has several features similar to Unix, still have some key differences. Before Linux and Windows, computer world was dominated by Unix. Unix is a copyrighted name and IBM AIX, HP-UX and Sun Solaris are only Unix operating system remained till date. Difference between Linux and Unix Comparison Linux Unix
  • 9. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Definition It is an open-source operating system which is freely available to everyone. It is an operating system which can be only used by its copyrighters. Examples It has different distros like Ubuntu, Redhat, Fedora, etc IBM AIX, HP-UX and Sun Solaris. Users Nowadays, Linux is in great demand. Anyone can use Linux whether a home user, developer or a student. It was developed mainly for servers, workstations and mainframes. Usage Linux is used everywhere from servers, PC, smartphones, tablets to mainframes and supercomputers. It is used in servers, workstations and PCs. Cost Linux is freely distributed,downloaded, and distributed through magazines also. And priced distros of Linux are also cheaper than Windows. Unix copyright vendors decide different costs for their respective Unix Operating systems. Development As it is open source, it is developed by sharing and collaboration of codes by world-wide developers. Unix was developed by AT&T Labs, various commercial vendors and non-profit organizations. Manufacturer Linux kernel is developed by the community of developers from different parts of the world. Although the father of Linux, Linus Torvalds oversees things. Unix has three distributions IBM AIX, HP-UX and Sun Solaris. Apple also uses Unix to make OSX operating system. GUI Linux is command based but some distros provide GUI based Linux. Gnome and KDE Initially it was command based OS, but later Common Desktop
  • 10. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India are mostly used GUI. Environment was created. Most Unix distributions use Gnome. Interface The default interface is BASH (Bourne Again SHell). But some distros have developed their own interfaces. It originally used Bourne shell. But is also compatible with other GUIs. File system support Linux supports more file system than Unix. It also supports file system but lesser than Linux. Coding Linux is a Unix clone,behaves like Unix but doesn't contain its code. Unix contain a completely different coding developed by AT&T Labs. Operating system Linux is just the kernel. Unix is a complete package of Operating system. Security It provides higher security. Linux has about 60-100 viruses listed till date. Unix is also highly secured. It has about 85- 120 viruses listed till date Error detection and solution As Linux is open- source,whenever a user post any kind of threat, developers from all over the world start working on it. And hence, it provides faster solution. In Unix, users have to wait for some time for the problem to be resolved. Linux vs. Windows Linux vs. Windows has always been one of the most frequently asked questions related to the operating system. Users often get confused about which one is better for them. There is diversity between the users as most users prefer the graphical user interface (GUI) and most command-line interface (CLI). There are many disagreements and acrimonious behavior among users, and it seems that it will be forever.
  • 11. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India In this section, we will discuss the differences between Linux and Windows by considering several parameters such as performance, usability, security, ease of use, and more to clear a picture of using both operating systems. Further, we will see the advantages of Linux over other operating systems such as Windows and Mac OS. This will help you to decide which one is better for you. Difference between Linux and Windows operating system To understand the difference between Linux and Windows, let's see a brief introduction to both operating systems. Later we will talk on their features and security options. What is the Windows operating system? Windows is a graphical operating system developed and marketed by Microsoft. It is also referred to as Microsoft Windows. Several versions of Windows have been introduced in the market; the current version is Windows 10. The first version of Windows was introduced on November 20, 1985, as a graphical operating system for MS-DOS. Microsoft Windows is a family of various operating systems. It comes with two versions, i.e., 64 bit and 32 bit. It facilitates both client and server versions. The latest client version is Windows 10, and the server version is Windows server 2019. Windows is a straight forward and simple to use. Generally, it is designed for users having no programming knowledge. So, mostly it is used for business and alternative industrial purposes.
  • 12. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India What is a Linux operating system Linux is an open-source operating system. As it is open-source, it is special and different from other operating systems, which means that you can customize it by editing source code. It provides programming as well as a graphical user interface. Linux is built by Linux Torvalds because he wanted to create a free operating system kernel that anyone can use. Linux is a collection of operating systems that are based on Linux kernel. The first version of Linux was released in the year 1991. The Linux system is most commonly used for servers; however, it is available in desktop versions as well. Ubuntu, Devian, and Fedora are some popular Linux distributions. Also, we have SUSE Linux Enterprise Server (SLES) and RedHat Enterprise Linux for the commercial distribution of Linux. As it is open-source, we can modify the source code and make variations in the operating system. Let's discuss some features and parameters to understand the difference between both operating systems: o File System Windows uses different drives such as C, D, E, and more, having some folders to store files. But Linux uses a tree structure to store and organize files. Linux file structure starts from the root directory, and it is considered as a start point of the file system. It is represented by a forward slash (/). In Linux, everything (Directories, devices, and files) is considered a file. There are three types of files available in a Linux system.
  • 13. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India o General files o Directory files o Device files The general file system of Unix is as follows: General files: General files or ordinary files are files that contain images, text, or a program. These files are in ASCII text or Binary format. The General files are the most common in any Linux system. Directory files: Directory files are the depository for other files. A directory can have a subdirectory file within it. For Windows, we can understand them as folders. Device files: Windows represents the external devices (Pendrives, hard drives, and CD- ROM) as letters such as E: F: But, Linux represents devices as files, such as the hard drive's partitions are represented as dev/sda1, dev/sda2, and more (depends upon the number of partitions). All the device files take place within the directory /dev. o Naming Conventions for file Linux files are case sensitive; therefore, we can have two files having the same name; one in upper case and other in lower case. Comparatively, the Windows files are not case sensitive; we cannot have two files with the same name. o Users Windows supports four types of users: o Administrator o Standard
  • 14. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India o Child o Guest Comparatively, Linux supports three types of users: o Regular o Administrative(root) o Service Regular User In Linux, when we install ubuntu on our system, a regular account user is created. By default, all our files are saved in the home directory (/home/). A regular user cannot access the other user's directories. Root User Apart from the regular user account, a root user account is also created during installation. The root account is also called as superuser as it can access the restricted files, install the software and other utility, and has administrative rights. For installing the software or editing the system files or any other administrative task, we need the root access. For general tasks such as creating files, playing games, browsing the internet, we don't need the root access. Service user The Linux system is widely used as the server operating system. The leading service providers such as Apache, Squid, email, and more have their service accounts to increase security. Linux service user can allow or deny access to various resources depending on the service type. Note: The Ubuntu Desktop version does not have a service account, and the regular accounts are called standard accounts. o Home Directory Linux OS has a separate home directory for a user. The files and directories created by a user are stored under a particular home directory. A user cannot store the files under any other user's directory, as it is not allowed to access the other user's directory. For example, the home directory of a user 'Alex' is automatically created as "/home/alex/" at the time of installation. The Windows OS also has different home directories for different users. It is as "C: documents or settings." o Other Directories
  • 15. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Linux systems have a tree structure to save the directories; comparatively, Windows uses different drives to save the directories. In Windows, system and program files usually take place in C drive. But in Linux, the system and program files take place in their specific directory such as software files are stored in /bin, programs and device files are in /dev, and boot files are stored in /boot directory. o Kernel The basic part of any operating system is its kernel. It interacts with hardware devices and performs other functions such as process management, file handling, and more. Different operating systems have different kernels. Linux and Windows have a different kernel. The Linux kernel is monolithic, and it consumes more running space. Comparatively, Windows uses the microkernel, which consumes less running spaces. But, Windows running efficiency is less than Linux. The key difference between Linux kernel and Windows kernel is that Windows is a commercial software while Linux is open-source software. o Pricing Linux is an open-source operating system, so almost all the utilities and libraries are entirely free. The GNU/Linux distribution can be simply downloaded for free. However, some companies are providing paid support for their Linux distributions, but the underlying software is still free. Microsoft Windows licensed copy usually cost between $99.00 and $199.00. Microsoft currently stops providing support for the earlier versions. The latest version, Windows 10, is available at $139. Let's focus some head to head comparison between Linux and Windows. Parameter Linux Windows Access Users can access the source code of kernel in Linux and can alter the kernel according to need. Usually, users cannot access the source code. However, members of some groups can have access to it. Variety Linux has several distributions that are highly Windows have fewer options to customize.
  • 16. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India customizable. Command- line The command line usually referred to as Terminal, which is the most useful tool of the Linux system. It used for administration and daily tasks. For the end-users, it does not look so effective. Windows also have a command line, but it is not such effective as a comparison to the Linux terminal. Most users prefer the GUI options for daily tasks. Installation The Linux installation process is a bit complicated to set up as it requires many user inputs. It takes less time than Windows to install. Windows OS is easy to install and set up on a machine; it requires fewer user input options during installation. However, it takes more time to install as compared to Linux. Ease of use The Linux OS is meant to be for the technical user because you must have some exposure to various Linux commands. Users may take more time to be a handy user of Linux. The troubleshooting process is also complicated as compared to Windows. Windows comes with simple and rich GUI options, so it is easy to use it. It can be simply used by technical as well as non-technical users. The troubleshooting process is also much easy than Linux.
  • 17. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Written in Linux is written in assembly language and C. Windows is written in C++ and assembly language. Reliability Linux is highly reliable and secure. It has well- established system security, process management, and uptime. Windows is not as much reliable as Linux. However, now Windows has improved reliability but still has some security weaknesses and system instabilities. Support Linux has a good support as it has a huge community of user forums and online search. Windows also provide good support to its user. It provides free as well as paid support. It has an easily accessible online forum. Update Linux provides full control to its users on updates. A user can install the update whenever needed. Also, it takes less time to install an update. Windows updates are annoying. The updates will come at any time and take too much time to install. Sometimes, you power on your machine, and updates are automatically getting started. Unfortunately, the user does not have much control over updates. Security Linux OS is more secure than Windows. It is hard for the hackers and attackers to find a loophole in it. So, Linux is hard to breakthrough. Windows is less secure than Linux. Attackers primarily target the Windows for malware and virus. Windows is most vulnerable without anti-virus. License Linux is distributed under the GPL(GNU Windows is distributed under a Proprietary commercial software license.
  • 18. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India General Public License) license. Linux Distributions (Distros) Other operating systems like Microsoft combine each bit of codes internally and release it as a single package. You have to choose from one of the version they offer. But Linux is different from them. Different parts of Linux are developed by different organizations. Different parts include kernel, shell utilities, X server, system environment, graphical programs, etc. If you want you can access the codes of all these parts and assemble them yourself. But its not an easy task seeking a lot of time and all the parts has to be assembled correctly in order to work properly. From here on distribution (also called as distros) comes into the picture. They assemble all these parts for us and give us a compiled operating system of Linux to install and use. Linux Distributions List There are on an average six hundred Linux distributors providing different features. Here, we'll discuss about some of the popular Linux distros today. 1) Ubuntu It came into existence in 2004 by Canonical and quickly became popular. Canonical wants Ubuntu to be used as easy graphical Linux desktop without the use of command line. It is the most well known Linux distribution. Ubuntu is a next version of Debian and easy to use for newbies. It comes with a lots of pre-installed apps and easy to use repositories libraries. Earlier, Ubuntu uses GNOME2 desktop environment but now it has developed its own unity desktop environment. It releases every six months and currently working to expand to run on tablets and smartphones. 2) Linux Mint Mint is based on Ubuntu and uses its repository software so some packages are common in both.
  • 19. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Earlier it was an alternative of Ubuntu because media codecs and proprietary software are included in mint but was absent in Ubuntu. But now it has its own popularity and it uses cinnamon and mate desktop instead of Ubuntu's unity desktop environment. 3) Debian Debian has its existence since 1993 and releases its versions much slowly then Ubuntu and mint. This makes it one of the most stable Linux distributor. Ubuntu is based on Debian and was founded to improve the core bits of Debian more quickly and make it more user friendly. Every release name of Debian is based on the name of the movie Toy Story. 4) Red Hat Enterprise / CentOS Red hat is a commercial Linux distributor. There products are red hat enterprise Linux (RHEL) and Fedora which are freely available. RHEL is well tested before release and supported till seven years after the release, whereas, fedora provides faster update and without any support. Red hat uses trademark law to prevent their software from being redistributed. CentOS is a community project that uses red hat enterprise Linux code but removes all its trademark and make it freely available. In other words, it is a free version of RHEL and provide a stable platform for a long time. 5) Fedora It is a project that mainly focuses on free software and provides latest version of software. It doesn't make its own desktop environment but used 'upstream' software. By default it has GNOME3 desktop environment. It is less stable but provides the latest stuff. Choosing a Linux Distro Distribution Why To Use UBuntu It works like Mac OS and easy to use. Linux mint It works like windows and should be use by new comers.
  • 20. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Debian It provides stability but not recommended to a new user. Fedora If you want to use red hat and latest software. Red hat enterprise To be used commercially. CentOS If you want to use red hat but without its trademark. OpenSUSE It works same as Fedora but slightly older and more stable. Arch Linux It is not for the beginners because every package has to be installed by yourself. Linux Licensing Linus Torvalds has given linux kernel license to GNU General Public License (GPL) version 2. GNU make sure that any software source code licensed under it have to make originating source code open and freely availble to all its users. Here, freely doesn't mean by cost but it means that it is freely available to users to distribute and modify the code. There is the third version of GNU, GNU Lesser General Public License (LGPL) version 3. But it imposes some more permissions on the license. Torvalds doesn't like some provisions in version 3 and have announced that linux kernel will not come under version 3. Linux Set Environment Variable The environment variables are dynamic values that are stored within a system and used by applications launched in shells or sub-shells. These variables have a name and their respected value. The environment variable customizes the system performance and the behavior of an application. The environment is the track for a computer application to interact with the system. The environment variable can have information about the default applications of the system, the system locale, the path of the executable file and the keyboard layout setting, and more. The environment variable makes an app available as per the system. Common Environment Variables Some standard environment variables are as follows: o PATH
  • 21. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India This variable contains a list of directories in which our system looks for files. It separates directories by a (:) colon. o USER This variable holds the username. o HOME This variable holds the default path to the user's home directory. o EDITOR This variable contains the path to the specified editor. o UID This variable contains the path to the user's unique id. o TERM This variable contains the path to the default terminal emulator. o SHELL This variable contains the path to the default shell that is being used by the user. o ENV This variable displays all the environment variable. How to set Environment Variable in Linux? There are multiple commands in Linux that allow us to set and create the environment variable. Use the export command to set a new environment variable. To create a new variable, use the export command followed by a variable name and its value. Syntax: 1. export NAME=VALUE To create a new variable say new_variable, execute the command as follows:
  • 22. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India 1. export new_variable=10 The echo command is used to display the variable: 1. echo new_variable To display the value of the variable, use the $ symbol before the variable name: 1. echo $new_variable Consider the below output: To set Java Environment Variable, execute the command as follows: 1. export PATH=$PATH:/home/jdk1.8/bin/ We can also create a user to define a variable by directly declaring it on the terminal. If we want to create a variable new_variable2, we can create it as follows: 1. new_variable2=100 Consider the below output: Accessing the value of Environment Variable To access the value of a variable, execute the echo command as follows: 1. echo $variable name Note: The variables are case sensitive; we cannot use any variable name 'new_variable' as 'New_variable.' The env command The env command is used to display all the available variables in the system. 1. env
  • 23. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Output: SHELL=/bin/bash SESSION_MANAGER=local/javatpoint-GB-BXBT-2807:@/tmp/.ICE- unix/1458,unix/javatpoint-GB-BXBT-2807:/tmp/.ICE-unix/1458 COLORTERM=truecolor XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg XDG_MENU_PREFIX=gnome- GNOME_DESKTOP_SESSION_ID=this-is-deprecated GTK_IM_MODULE=ibus LANGUAGE=en_IN:en QT4_IM_MODULE=ibus MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path GNOME_SHELL_SESSION_MODE=ubuntu SSH_AUTH_SOCK=/run/user/1000/keyring/ssh XMODIFIERS=@im=ibus DESKTOP_SESSION=ubuntu SSH_AGENT_PID=1362 GTK_MODULES=gail:atk-bridge PWD=/home/javatpoint LOGNAME=javatpoint XDG_SESSION_DESKTOP=ubuntu XDG_SESSION_TYPE=x11 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 XAUTHORITY=/run/user/1000/gdm/Xauthority GJS_DEBUG_TOPICS=JS ERROR;JS LOG WINDOWPATH=2 HOME=/home/javatpoint USERNAME=javatpoint IM_CONFIG_PHASE=1 LANG=en_IN LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd =40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:e x=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01; 31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31: *.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;3 1:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*. rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace =01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm= 01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*. gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35: *.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35: *.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm
  • 24. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India =01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.n uv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fl i=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=0 1;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=0 0;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra= 00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: XDG_CURRENT_DESKTOP=ubuntu:GNOME VTE_VERSION=5802 GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/dc6e48ed_7868_43d5_a086 _fd6d6a90a74a INVOCATION_ID=fadf556d1cf5422ea55b247bf57c3c99 MANAGERPID=1252 CLUTTER_IM_MODULE=ibus GJS_DEBUG_OUTPUT=stderr LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path LESSOPEN=| /usr/bin/lesspipe %s USER=javatpoint GNOME_TERMINAL_SERVICE=:1.216 DISPLAY=:0 SHLVL=1 QT_IM_MODULE=ibus XDG_RUNTIME_DIR=/run/user/1000 JOURNAL_STREAM=9:35179 XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/ snap/bin GDMSESSION=ubuntu DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus _=/usr/bin/env javatpoint@javatpoint-GB-BXBT-2807:~$ Removing an Environment Variable By removing an environment variable we can remove all existing component of particular variable. To remove an environment variable, execute the unset command followed by variable name: 1. unset variable name The above command will delete the specified variable and its components from the system.
  • 25. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India To remove a variable new_variable from the system, execute the command as follows: 1. unset new_variable Consider the below output: Linux Set Command Linux set command is used to set and unset certain flags or settings within the shell environment. These flags and settings determine the behavior of a defined script and help in executing the tasks without facing any issue. The values of shell attributes and parameters can be changed or displayed by using the set command. Syntax: 1. set [options] To know about how to set the environment variable in Linux, visit Here. Options: The supported options by the set command are as following: o -a: It is used to mark variables that are modified or created for export. o -b: It is used to notify of job termination immediately. o -e: It is used to exit immediately if a command exits with a non-zero status. o -f: It is used to disable the file name generation (globbing). o -h: It is used to save the location of commands where they looked up. o -k: It is used to place all assignment arguments in the environment variable of a command, except those that precede the command name. o -m: It is used to enable Job control. o -n: It is used to read commands. o -o: It is used for option-name. o -p: It is used to disable the processing of the '$ENV' file and import shell functions. It is turned on whenever the real and effective user ids do not match. Turning off this option may cause the working uid and gid to be set as the authorized uid and gid. o -t: It is used to exit from the command after executing one command. o -u: It is used to treat unset variables as an error when substituting. o -v: It is used to print shell input lines.
  • 26. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India o -x: It is used to print commands and their arguments in a sequential way (as they are executed). o -B: It is used to perform brace expansion by the Shell. o -C: It is used to disallow existing regular files to be overwritten by redirection of output. o -E: It is used if the ERR trap is inherited by the shell functions. o -H: It is used to enable style history substitution. By default, it is on when the shell is interactive. o -P: It is used if we do not want to follow symbolic links when executing commands. o -T: If this flag is set, the DEBUG trap is inherited by the shell functions. Note: To turn off the above flags, use the '+' rather than '-' symbol. To better understand the set command, let's see a brief introduction of the shell variable: Shell Variable A variable is a character string that can hold a value. The assigned value could be anything such as number, filename, text, or any other data type. It is just like a pointer to the actual data. The shell allows us to create, delete, and assign variables. The variable name can have any letters, numbers, or underscore (_) character. We cannot have the characters such as "! *, or -", because these special characters have other meanings for the shell. According to Unix naming convention, the Unix shell variable must have their names in UPPERCASE. Examples of the set command Turn debugging information on or off. The '-x' option is used with the set command to show command and their arguments. It is useful for debugging the shell script. Execute the following command: To turn on the debugging information: 1. set -x To turn off the debugging information: 1. set +x Disable Bash's default behavior.
  • 27. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India To disable the default behavior of Bash, execute the command as follows: 1. set -C Stop a script immediately. To stop a script immediately, execute the following command: 1. set -e Getting Help If you get stuck during the use of the set command, you can access the help documentation from your terminal. To access the help manual, execute the below command: 1. set --help Linux export Command The export command is a built-in utility of Linux Bash shell. It is used to ensure the environment variables and functions to be passed to child processes. It does not affect the existing environment variable. Environment variables are set when we open a new shell session. At any time, if we change any variable value, the shell has no way to select that change. The export command allows us to update the current session about the changes that have been made to the exported variable. We do not need to wait to start a new shell session. Syntax: 1. export [-f] [-n] [name[=value] ...] or export -p Let's have a look at various examples of the export command: Example1: The export command without any argument The basic export command will display all the exported environment variables of your system. It is executed as follows: 1. export Consider the below snap of output:
  • 28. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Example2: Display all exported variable on current shell To display all the exported environment variable of the current shell, execute the command with -p option as follows: 1. export -p Consider the below snap of output:
  • 29. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Example3: Using export with functions To use a function with the export command, use the -f option. If we do not use this option, it will be considered as a variable, not function. Syntax: 1. export -f function_name We are exporting a function 'name' as follows: 1. name() { echo "Javatpoint";} To export the above function, execute the command as follows: 1. export -f name Now, invoke the bash shell to execute the function: 1. bash
  • 30. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India To call the function, enter the function name: 1. name Consider the below output: let's create another function 'hello,' execute the command as follows: 1. function hello 2. > { 3. > echo hello, welcome to javatpoint 4. > } To export the above function, execute the command as follows: 1. export -f hello Consider the below output: Example4: Assign a value before exporting a function or variable: The export command allows us to assign a value before exporting a function. Consider the below command: 1. export name[=value] For example, assign a value to a variable as follows: 1. a=5 now export it as: 1. export a we can verify the assignment by using the printenv command as follows: 1. printenv a
  • 31. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India Consider the below output: Example5: Set vim as default editor: The vim editor is the most widely used text editor for the Linux systems. We can set the vim as default text editor by using the export command. To set the vim as a default text editor, execute the following command: 1. export EDITOR=/usr/bin/vim 2. export | grep EDITOR The above commands will not show any confirmation. Consider the below output: Example6: Set an environment variable To create a new variable, use the export command followed by a variable name and its value. Syntax: 1. export NAME=VALUE To create a new variable, 'sys,' execute the command as follows: 1. export sys=50 The echo command is used to display the variable: 1. echo sys To display the value of the variable, use the $ symbol before the variable name 1. echo $sys Consider the below output:
  • 32. Mrs. Bhuvaneswari R, Department of Computer Science, DKM College for Women(Autonomous), Vellore, TamilNadu, India