SlideShare a Scribd company logo
TOPIC OF DISCUSSION
• Introduction to Linux
• Linux Architecture
• File System
• Memory Management
• Ubuntu Installation
• File Commands
1
What is Linux?
• Linux is the software on a computer that enables applications and the
computer operator to access the devices on the computer to perform
desired functions.
• The OS relays instructions from an application to computer's processor
which performs the instructed task, then sends the results back to the
application via the operating system.
• Sounds very similar to other operating systems, such as Windows.
2
How its different compared to other OS?
• Something sets Linux apart from other operating systems.
• As an open operating system, Linux is developed collaboratively,
meaning no one company is solely responsible for its development or
ongoing support.
• Companies participating in the Linux economy share research and
development costs with their partners and competitors.
• Over 1,000 developers, from at least 100 different companies,
contribute to every kernel release. In the past two years alone, over
3,200 developers from 200 companies have contributed to the kernel--
which is just one small piece of a Linux distribution.
3
Where is Linux?
• One of the most noted properties of Linux is where it can be used.
• Windows and OS X (MAC OS) are predominantly found on
personal computing devices such as desktop and laptop computers.
• Other operating systems, such as Symbian(Mobile OS), are found
on small devices such as phones and PDAs (personal digital
assistants).
• Linux, which began its existence as a server OS and has become
useful as a desktop OS, can also be used on all of these devices.
“From wristwatches to supercomputers,” is the popular description
of Linux' capabilities.
4
The Future of Linux.
• Linux is being installed on the system BIOS (basic input/output system)
of laptop and notebook computers, which will enable users to turn their
devices on in a matter of seconds.
• This environment allows users to work on the Internet without having to
boot all the way into their device's primary operating system even if that
operating system is Windows.
• Linux is showing up on mobile Internet devices (MIDs) such as
smartphones and PDA.
• The growth of cloud computing is a natural fit for Linux, which already
runs many of the Internet's web servers such as Amazon's S3.
5
About the founder of LINUX
•Linus Benedict Torvalds (born December
28, 1969) began the development of Linux,
an operating system kernel, and today acts
as the project coordinator.
•Inspired by Minix (a kernel and operating
system developed by Andrew Tanenbaum),
he felt the need for a capable UNIX
operating system that he could run on his
home PC.
•Torvalds did the original development of
the Linux kernel primarily in his own time
and on his equipment.
•Torvalds originally used Minix on his
computer, a simplified kernel written by
Andrew Tanenbaum for teaching operating
system design.
•The Linux system quickly surpassed Minix in
functionality.
•The first version of the Linux kernel was
released to the Internet in September 1991. with
the second version following shortly thereafter
in October
About the founder of LINUX
GNU’s (GNU’s Not Unix)
• The GNU project was started in 1983 for developing a complete Unix-like
operating system, including software development tools and user application
programs, entirely of free software.
• By the release of the first version of the Linux kernel, the GNU project had
produced all the necessary components of this system except the kernel.
• Torvalds and other early Linux-kernel developers adapted their kernel to work
with the GNU components and user space programs to create a fully
functional operating system.
Linux Vs Windows
Open Source Development Model and
so the programmer can redesign the
OS.
It is not an open source and hence
cannot be redesigned by the
programmer.
Linux is robust and very much secure
from virus.
Windows gets affected by virus very
easily.
The Linux servers has surpassed
windows server operating system in
security.
Security is the main issue which has
made windows to think to survive.
It costs less to design and implement a
Linux Network.
It costs more to implement Windows
Network administration, when
compared to Linux.
There are 250000+ developers behind
Linux for open source deployment.
Compared to Linux, windows is
developed by few thousands of
people.
Linux Flavors
• Red Hat Linux (Red Hat)
• Fedora Linux
• Open Linux (Caldera)
• SuSE Linux (Novell)
• Mandrake Linux (Mandrake)
• Turbo Linux (Pacific Hi-Tech)
• Linux PPC (MAC Power PC version)
• Info magic
• Slack ware Linux Project
• Knoppix (Live CD)
11
LINUX
ARCHITECTURE
Operating System Architectures
• Monolithic
• Layered
• Micro-kernel
• Distributed
Monolithic Architecture
Monolithic Architecture
• Monolithic operating system
– Every component contained in kernel
• direct communication among all elements
• highly efficient
– Problems:
• complexity
• new devices, emerging technologies
– enabling, protection
Layered Architecture
• Groups components that perform similar
functions into layers
• Each layer communicates only with adjacent
layer
• System calls might pass through many
layers before completion
Layered Architecture
Microkernel Architecture
• Microkernel
– provides only small number of services
– attempt to keep kernel small and scalable
• High degree of modularity
• Extensible, portable and scalable
• Increased level of inter-module
communication
Microkernel Architecture
Distributed Operating Systems
• Network operating system
– Runs on one computer but allows its processes to
access remote resources
• Distributed operating system
– Single OS manages resources on more than one
computer
Distributed Operating Systems
Linux Kernel Architecture
• Monolithic kernel:
Contains modular components
– Process management
– Interprocess communication
– Memory management
– File system management
• VFS: provides a single file system interface
– I/O management
– Networking
Linux Kernel Architecture
23
LINUX FILE
SYSTEM
24
Introduction
• File system
– How are data stored in storage?
– How do users access the data?
• Data organization, files and directories
• File system types
– Disk FS: ext2, ext3, FAT, FAT32 & NTFS
– Network FS: Samba & NFS
– Flash FS: JFFS2
– Special FS: proc FS
25
Introduction (cont’d)
• You should understand Linux FS
– Why?
• Everything in Linux is file, if it is NOT process
– Easy to use
• Open file, read/write and close the file
• Unlike Windows, Linux FS is standard FS
– Everyone should learn standards
26
File system Hierarchy Standard
• There is not any drive C:, D:, …
• All directories are under “/”
– “/” is the root directory
• It is possible
– to have multiple partitions
– to multiple file systems
27
The “/”
• The primary hierarchy in FSH
– The root of tree of file system
• All paths start form here
• There is only one “/” in file system
28
The “/”
29
boot
• Linux kernel
• Boot loader configuration
• If you lost boot
– You cannot boot your OS
30
boot
31
bin
• Essential programs
• Need for system startup
• Basic commands for
– Navigating in filesystem
– File management
32
bin
33
dev
• Everything is file
– Hardware components (devices) are file
• Hard disk
• Key board
• All device files are here
• Direct interaction with device driver
– Open the device file
– Read & Write
34
dev
35
etc
• System configuration directory
– What is done by the registry in Windows
• All configuration file are text files
– You can view and edit it manually
36
etc
37
home
• Home directory of user
• Each user has a directory
– /home/bahador
– /home/hamed
• All files of user are stored here
38
lib
• Programs need libraries
– Dynamically linked libraries
• Programmers need libraries
• All essential libraries are here
– Needed for system startup
39
lib
40
proc
• Kernel’s interface
– Kernel pseudo-directory
• Special directory
– It is NOT a directory on hard disk
• Kernel Configuration
• Kernel State monitoring
41
proc
42
root
• Home directory of root
• Don’t confuse
– / is the “root of File system”
– root is the name of system admin
– /root is the admin
43
sbin
• System configuration programs
– Format hard disk
– Manage hardware
• Only “root” can run the programs
44
sbin
45
tmp
• Temporary directory
• All temp files are created by programs
• Your temp files
• It is emptied regularly
46
usr
• Secondary hierarchy
• Very useful programs
– We usually use them
• compiler, tools
• Are not essential for system startup
47
usr
48
var
• The variable directory
• All dynamic files
• User cannot change the files
49
var
50
Permissions
• There are 3 basic permissions
– Read (r)
– Write (w)
– Execute (x)
• How to find them
– ls -l
• How to change them
– chmod +/- r/w/x <filename>
51
LINUX MEMORY
MANAGEMENT
Linux Memory Management
• Allocates memory space to each process
– e.g., In Intel X86, Linux allocates 1 GB of high order
memory to kernel and 3 GB of memory to executing
processes
• Address space is divided among:
– Process code
– Process data
– Code and shared library data used by process
– Stack used by process
Linux Memory Management
(continued)
• Linux has system calls that change size of
process data segment as required
• Offers memory protection based on type of
information stored
• When kernel needs memory space, pages are
released using LRU algorithm
• Maintains a dynamically managed area in
memory, a page cache
Linux Memory Management
(continued)
• If any pages marked for deletion have been
modified, they’re rewritten to disk
– Page corresponding to file mapped into memory is
rewritten to file
– Page corresponding to data is saved on swap
device
• Linux uses system of page table to keep track
of free and busy pages
• Uses virtual memory mechanism
55
UBUNTU
INSTALLATION
introduction to Linux operating system .pptx
Login screen
Enter the user
name
PWD
• PWD
• Present working Directory
• Display the absolute path of the current
directory.
The absolute path of
the root directory is
displayed.
PWD
ls
• ls :
• List the Files and Directories within the current directory.
• Syntax:
• ls [options]
• Options:
• -l List file with permission.
• -a List hidden file.
• -i List files and inode number.
• -R List directories , sub directories
ls
Lists the files and
directories in the present
directory.
ls -l
l option lists the long
listing of Files and
directory.
l l command
File or directory
names.
Time stamp
Size of the files or
directories
The name of the group which has
the permissions over the files or
directories
Owner name, the user
who created the
directory.
No of links to the directory
It defines the permissions
assigned to the owners,
groups and other users
ls -a
[a] option lists all files and
directories including hidden files
ls -al
al option lists all files and
directories including hidden files
in long listin format.
ls -R
[R] option lists working directory
as well as contents in the
directory.
mkdir
• mkdir :
• Make directory (or) To create a
directory
• Syntax : mkdir <dirname>
cd
• cd
• Change directories
• Syntax : cd <directory name>
• cd .. To a directory one level up (parent
directory)
• cd - To your previous working directory
• cd / To the / (slash) directory
cd –
cd -
command will take you to
the previous working
directory
Here the current directory is
newdir when we enter cd -, it
takes to the previously worked
directory.
Again cd - is given as shown.
Now it will take to the
previously worked directory
i.e., (newdir)
cat
• cat
– it is the command to create and view files
• Syntax:
• cat [options] [filename]
cat > [filename] → To create a file
cat [filename] → To view a file
cat >> [filename] → To append text to a file
cat
As mentioned in the
previous slide. cat is
used to create a file
The file is saved
through ctrl -d after
typing the text
cat
Enter
cat <filename> to
view the content of
file.
cat
To append the text in a
file,
Cat >> (symbol) and
file name.
cat
The screen shows
the appended file
The -s option trims
multiple adjacent
blank lines into single
blank line
cat
The –b option
numbers the each
text line of the
output
cat
The –A option shows all
characters including control
and non printing characters
Here the $ represents the end of
the line
touch
• touch command is used to update the time stamps of a file.
• touch is also used to create new empty file.
– Syntax : touch [filename]
• touch can create multiple empty file too.
– Syntax : touch [filename1] [filename2]
touch
Here the empty file
is created
Multiple files are
created using touch
command
touch
Copy Command
• cp : cp command is known for copying files and
directories.
Syntax : cp [options] source destination
Options :
-r recursively copy an entire directory tree
-p preserve permissions, ownership, and time stamps
– Example :
cp File1 File2
There is a file
named ‘a’ in the
directory test .
Copy Command
Here we notice that test1 is a
empty directory. Let us copy
the file ‘a’ into this directory.
Copy Command
Cp copies the file ‘a’ from the
directory test to the directory
test1.
Copy Command
Thus the file ‘a’ is
copied to the test1
directory.
Copy Command
Directories new and
old are listed with
their contents.
Copy Command
-r option copy the
entire directory tree
‘old’
Copy Command
Copy Command
Thus the contents
of old directory is
copied to new
directory.
Copy Command
Command l l shows the
permission of the file
Copy Command
Using chmod,
permission of the file is
changed
Copy Command
Now, we copy the
file one to the
directory old
Copy Command
See the comparison
of the file one
shown above in the
new and old
directory
Copy Command
Now using command cp along with
–p option the permission is
preserved.
•mv : This command is used to move and renaming
files and directories
•Syntax:
mv <source> <destination>
Example
mv file1 file2 (now the file1 is changed to file2)
Move Command
Move Command
A file is available in
the name of one in
the directory old
Move Command
Here we see that using
mv command the file is
moved from old to
new directory.
Move Command
Now check into the old
directory where the file one
is moved. Hence the
directory is empty
Move Command
The file one is shown above in
the new directory
Move Command
Here a file is
created test in the
old directory
Move Command
This example shows
how to rename a file
test to tested
Move Command
Using the l l command, the
above screen shows the
renamed file
rm and rmdir command
• rm : This command is used to remove files
Syntax: rm <filename>
Example :
rm file1
• rmdir : This command is used to remove directories.
• Syntax: rmdir <directory name>
Example :
rmdir linux
This screen shows the
contents of the new
directory
rm command
The above rm command
is used to remove the
file k
Here the file named k is
removed from the directory
rm command
Here a directory is created named
donic which is removed through the
command rmdir
rmdir command
The above screen
shows that directory
donic is removed
rmdir command
In the above screen we
see that directory tomy
is unable to remove
rmdir command
Using rm with option – r,
the directory along with
contents can be removed
rm command
Now the above
screen shows that
the directory is
removed
rm -r command
The above screen shows
the contents of
directory jerry
rm command
The rm with –ri
command is used to
remove the contents
interactively.
rm -ri command
We can see that the file for which
we have given ‘y’ is removed and
‘n’ is preserved
rm -ri command
• The file command is used to check the file content.
• Syntax : file <filename>
• Example: file f1 (f1 is a file. File will show the
format)
• file /dev/fd0 (The output shows that the
fd0 is a block special file)
File command
File format
The file along with file name
(ss) shows the file format
This shows the
format of the
file cat as
executable file
File format
more
l l command shows
the contents at once.
more
l l lists the content
quickly, which makes
the viewer to see
only last page
more
More is used to
lists the contents
one screen at a
time
more
More is been
prompted after
listing one by one
more
Here it is the
same process
listing more
contents, shown
as above
more
Here it is the
same process
listing more
contents, shown
as above
more
Now the more
command is over
and we are in
the end of the
page
vi & vim editor
➢Vi is known as the visual editor.
➢It is a standard editor under Linux and Unix system.
➢Vim is the improved version of vi editor
➢Vi have three modes of operation
Command mode
Insert mode
Esc mode
vi Modes
• Command mode:
• Operations such as cut, copy, paste, delete, undo,
redo etc., are done in this mode.
• Insert mode:
• Type in new text
• Ex-mode :
• Extended commands for saving, exiting, search-and-
replace can executed here
Working with vi editor
exam is a file
created or
opened with the
vi editor.
Command Mode
Press ‘i’ to get
into the insert
mode
Insert Mode
This is the insert
mode
After typing the
data’s hit escape to
get into command
mode
Insert Mode
Ex- Mode
Press :wq to
write and
quit
Ex- Mode
Press q! to
quit without
saving the
data
Yank
Hit escape and type 3yy to
yank three lines from the
cursor position
Like this example, you can
copy any number of lines
by typing numbers of lines
and yy
In the previous slide, we
saw how to yank the text.
After yanking we see the
message as below
Text yanked
Now the yanked text is
pasted from the cursor
position by hitting the ‘p‘
Text put
delete
To delete text, place the
cursor in the beginning of the
line and give the total number
and dd
Now 3 lines are
deleted and message
get displayed as 3
fewer lines as shown
below
delete
cut and put
To cut a line after curser
position hit 1cc.
Get into insert mode and place
the cursor where the data should
be pasted. Press esc to get in to
command mode
cut and put
Now hit p to paste the
data.
cut and put
Search
Get into ex mode type /
followed by data to be
searched and press enter
When we press enter it shows
the first found match from
bottom to top.
Search
Then if we press ‘n’ it will shows the
second match for that data.If we continue
pressing n it will show successive
matches.
Search
Find command
• Find: To search files and directories in a
specified path.
• Syntax: find <directory> [conditions] [action]
• Condition: -name <file name> - to search a
particular file
• -user <user name> - lists the files owned by
user.
• -perm <mode> - search a file depending
on permission.
This command searches
the password file from /
directory.
Find command
The above screen shows
the execution of
command
Find command
Locate command
• Locate:
• To search or locate files and directories
from the database.
• It locate the files faster than the find
command
• Syntax:
• locate [pattern]
To search file named
test1 from database.
Locate command
All the files and directories
named test1 is located and
displayed.
Locate command
• man : Display helpful information about
commands.
• Syntax:
• man [option] command
• Option:
• –k - search by command description
rather than command name.
Man command
Man command
It displays manual pages for
ls command.
Man command
The manual page of ls
command is displayed here.
Enter q to exit from manual
page.
• useradd :
• To create a new user account and login
directory for that new account.
• Useradd will create new entries in system
files.
• Syntax : useradd [options] [user]
• Options
• -c Comment field.
-d Home directory
• -e Account expiration date.
useradd command
useradd command
User named
abdulkalam is created.
To set password for
abdulkalam.
useradd command
Enter the
password.
User home directory
When new user account is
created ,a login directory for
the user is created in /home
dir.
User configuration files
• When a new user account is created, its entries
updates the following system files.
• - /etc/passwd
• - /etc/group
• - /etc/shadow
Passwd file
To view password
configuration file.
Passwd file
First field represent
username.
x represents encrypted
password is available in
shadow file.
User id.
Group id.
User home
directory.
User login shell.
Group id for the
user abdulkalam.
Groups file
User login
Abdulkalam
logging in .
User login
User home dir
or login dir
User account can be deleted
through userdel command
userdel command
Creating groups
• New group is created by hand-editing the file
/etc/group or by using groupadd command.
• Syntax: groupadd groupname
• groupdel command is used to remove the group.
• Syntax groupdel groupname
• Groupmod is used to rename the existing
groupname.
• Syntax: groupmod –n newname oldname
Groupadd command
A group is added in the name
of india by using the command
groupadd.
Usermod command
Using usermod command
the user abdulkalam is
added to group India
Groups file
To view group file
The last field shows the user
abdulkalam added in India group
Groups file
The id number assigned to the
group india is 501
Groupdel command
Groupdel command deletes
window group.
Group Administration
Create a directory named
product and group named
sales.
User’s are added in the sales
group using usermod
command.
Group Administration
Open the group
file.
Group Administration
This shows that the three
users are added in the sales
group.
Group Administration
Change the group name sales to product
directory using chgrp command.
Group Administration
The screen shows that the
changes been made in the
group field.
Group Administration
Three files created under product
directory.
Group Administration
The permission for the
product directory is
changed.
Group Administration
The user tom is not a member of
the group. So the permission is
restricted.
Group Administration
suresh logs in terminal. As he is the
member of the group, he have the
privilege to access the file.
Group Administration
rajesh logs in terminal. As he is the
member of the group, he have the
privilege to access the file.
Group Administration
tom logs in terminal. he is not the
member of the group so does not have
the privilege to access the file.
Group Administration
The above screen shows the
permission been restricted to the
user tom.
Group Administration
Changing owner
The chown command
change the file or
directory owner.
After giving the chown
command the owner is
changed from root to
suresh.
Changing owner
The owner and group name
can be change using chown
command.
User administration
Chage –l : lists the
account and password
information of user tom.
This field sets the
password for the
maximum valid days
given.
Inactive period is used to
give grace time to change
the password.
User administration
The –M command with
100 sets as the maximum
days.
The password expires
field is updated by +100
days from user creation
date.
User administration
Allowable account
inactivity period after
which password will
expire.
User administration
The -W option shows the
warning message before
expiration.
User administration
The -m option for
minimum number of
days a user can exists
with password.
The -E option is for
specific expiration date
for an account.
User administration
Set userID
• It allows an executable file to run under the
user or group security context with the
permission of its owner.
• SUID can be set as follows:
• chmod u+s [filename]
(or)
• chmod 4xxx [filename]
The above screen shows file
shadow and password along with
the set user id permission.
The passwd is the command which
updates the password in the shadow
file, instead of not having the execute
permission.
Set userID
Tom changes the password
using passwd command.
Set userID
The set userid permission
is removed from the
/usr/bin/passwd file.
Set userID
Now we can view that tom
user cannot change the
password.
Set userID
Set GroupID
The user suresh logs get
into the product directory
and create a file.
The user suresh who create a
file, the group name is
assigned as suresh.
The groupid is set to
the product directory.
Note: the group sales is added
to the product directory.
Set GroupID
After setting the group id, user
suresh creates a file win98. Using
the command ls –l shows that the
file is created under the group
sales.
Set GroupID

More Related Content

PPTX
Cha-2- Software Maintenance Part-2.gghgpptx
PPT
Chapter 8 - nsa Introduction to Linux.ppt
PPTX
Introduction to linux ppt
PPTX
Introduction about linux
PDF
introductiontolinuxpptbatch2-141025005514-conversion-gate01 (1).pdf
PDF
Presentation on linux
PDF
Linux Presentation_SSD.pdf
PPT
Intro to linux
Cha-2- Software Maintenance Part-2.gghgpptx
Chapter 8 - nsa Introduction to Linux.ppt
Introduction to linux ppt
Introduction about linux
introductiontolinuxpptbatch2-141025005514-conversion-gate01 (1).pdf
Presentation on linux
Linux Presentation_SSD.pdf
Intro to linux

Similar to introduction to Linux operating system .pptx (20)

DOCX
commands that's are commonly used in linux
DOCX
Linux notes
PPTX
Programming and problem solving 3
ODP
Introduction to linux
PPTX
PPT
Linux concept workshop
PPTX
Linux – an introduction
PPT
Linux for everyone
PDF
Before begining linux
PPTX
Case study operating systems
PDF
Linux begining level
PPT
Linux_CASESTUDY.ppt
PDF
Linux Tech Info with lot's of information
PPT
Linux [2005]
PPT
linux system and network administrations
PDF
3CS LSP UNIT 1-1.pdf
PPTX
I Am Linux-Introductory Module on Linux
PPT
Linux - Introductions to Linux Operating System
PPTX
linux _________________________v1.2.pptx
PPT
commands that's are commonly used in linux
Linux notes
Programming and problem solving 3
Introduction to linux
Linux concept workshop
Linux – an introduction
Linux for everyone
Before begining linux
Case study operating systems
Linux begining level
Linux_CASESTUDY.ppt
Linux Tech Info with lot's of information
Linux [2005]
linux system and network administrations
3CS LSP UNIT 1-1.pdf
I Am Linux-Introductory Module on Linux
Linux - Introductions to Linux Operating System
linux _________________________v1.2.pptx
Ad

More from AnuradhaJadiya1 (6)

PPTX
MSWM_India_History_and_2016_ proposed Rules.pptx
PPTX
Municipal_Solid_Waste_Management_Rules_India.pptx
PPTX
linux networking laboratory presentation .pptx
PPSX
Data structure_Stack Introduction & app.
PDF
Module - 5_Trees.pdf
PPT
infixToPostfixConversion example.ppt
MSWM_India_History_and_2016_ proposed Rules.pptx
Municipal_Solid_Waste_Management_Rules_India.pptx
linux networking laboratory presentation .pptx
Data structure_Stack Introduction & app.
Module - 5_Trees.pdf
infixToPostfixConversion example.ppt
Ad

Recently uploaded (20)

PPTX
Lecture Notes Electrical Wiring System Components
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPT
Mechanical Engineering MATERIALS Selection
PDF
Well-logging-methods_new................
PPTX
additive manufacturing of ss316l using mig welding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Welding lecture in detail for understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Sustainable Sites - Green Building Construction
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
bas. eng. economics group 4 presentation 1.pptx
DOCX
573137875-Attendance-Management-System-original
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Digital Logic Computer Design lecture notes
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Lecture Notes Electrical Wiring System Components
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Mechanical Engineering MATERIALS Selection
Well-logging-methods_new................
additive manufacturing of ss316l using mig welding
Operating System & Kernel Study Guide-1 - converted.pdf
UNIT 4 Total Quality Management .pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Welding lecture in detail for understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Sustainable Sites - Green Building Construction
Embodied AI: Ushering in the Next Era of Intelligent Systems
CYBER-CRIMES AND SECURITY A guide to understanding
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
bas. eng. economics group 4 presentation 1.pptx
573137875-Attendance-Management-System-original
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Digital Logic Computer Design lecture notes
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx

introduction to Linux operating system .pptx

  • 1. TOPIC OF DISCUSSION • Introduction to Linux • Linux Architecture • File System • Memory Management • Ubuntu Installation • File Commands 1
  • 2. What is Linux? • Linux is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions. • The OS relays instructions from an application to computer's processor which performs the instructed task, then sends the results back to the application via the operating system. • Sounds very similar to other operating systems, such as Windows. 2
  • 3. How its different compared to other OS? • Something sets Linux apart from other operating systems. • As an open operating system, Linux is developed collaboratively, meaning no one company is solely responsible for its development or ongoing support. • Companies participating in the Linux economy share research and development costs with their partners and competitors. • Over 1,000 developers, from at least 100 different companies, contribute to every kernel release. In the past two years alone, over 3,200 developers from 200 companies have contributed to the kernel-- which is just one small piece of a Linux distribution. 3
  • 4. Where is Linux? • One of the most noted properties of Linux is where it can be used. • Windows and OS X (MAC OS) are predominantly found on personal computing devices such as desktop and laptop computers. • Other operating systems, such as Symbian(Mobile OS), are found on small devices such as phones and PDAs (personal digital assistants). • Linux, which began its existence as a server OS and has become useful as a desktop OS, can also be used on all of these devices. “From wristwatches to supercomputers,” is the popular description of Linux' capabilities. 4
  • 5. The Future of Linux. • Linux is being installed on the system BIOS (basic input/output system) of laptop and notebook computers, which will enable users to turn their devices on in a matter of seconds. • This environment allows users to work on the Internet without having to boot all the way into their device's primary operating system even if that operating system is Windows. • Linux is showing up on mobile Internet devices (MIDs) such as smartphones and PDA. • The growth of cloud computing is a natural fit for Linux, which already runs many of the Internet's web servers such as Amazon's S3. 5
  • 6. About the founder of LINUX •Linus Benedict Torvalds (born December 28, 1969) began the development of Linux, an operating system kernel, and today acts as the project coordinator. •Inspired by Minix (a kernel and operating system developed by Andrew Tanenbaum), he felt the need for a capable UNIX operating system that he could run on his home PC. •Torvalds did the original development of the Linux kernel primarily in his own time and on his equipment.
  • 7. •Torvalds originally used Minix on his computer, a simplified kernel written by Andrew Tanenbaum for teaching operating system design. •The Linux system quickly surpassed Minix in functionality. •The first version of the Linux kernel was released to the Internet in September 1991. with the second version following shortly thereafter in October About the founder of LINUX
  • 8. GNU’s (GNU’s Not Unix) • The GNU project was started in 1983 for developing a complete Unix-like operating system, including software development tools and user application programs, entirely of free software. • By the release of the first version of the Linux kernel, the GNU project had produced all the necessary components of this system except the kernel. • Torvalds and other early Linux-kernel developers adapted their kernel to work with the GNU components and user space programs to create a fully functional operating system.
  • 9. Linux Vs Windows Open Source Development Model and so the programmer can redesign the OS. It is not an open source and hence cannot be redesigned by the programmer. Linux is robust and very much secure from virus. Windows gets affected by virus very easily. The Linux servers has surpassed windows server operating system in security. Security is the main issue which has made windows to think to survive. It costs less to design and implement a Linux Network. It costs more to implement Windows Network administration, when compared to Linux. There are 250000+ developers behind Linux for open source deployment. Compared to Linux, windows is developed by few thousands of people.
  • 10. Linux Flavors • Red Hat Linux (Red Hat) • Fedora Linux • Open Linux (Caldera) • SuSE Linux (Novell) • Mandrake Linux (Mandrake) • Turbo Linux (Pacific Hi-Tech) • Linux PPC (MAC Power PC version) • Info magic • Slack ware Linux Project • Knoppix (Live CD)
  • 12. Operating System Architectures • Monolithic • Layered • Micro-kernel • Distributed
  • 14. Monolithic Architecture • Monolithic operating system – Every component contained in kernel • direct communication among all elements • highly efficient – Problems: • complexity • new devices, emerging technologies – enabling, protection
  • 15. Layered Architecture • Groups components that perform similar functions into layers • Each layer communicates only with adjacent layer • System calls might pass through many layers before completion
  • 17. Microkernel Architecture • Microkernel – provides only small number of services – attempt to keep kernel small and scalable • High degree of modularity • Extensible, portable and scalable • Increased level of inter-module communication
  • 19. Distributed Operating Systems • Network operating system – Runs on one computer but allows its processes to access remote resources • Distributed operating system – Single OS manages resources on more than one computer
  • 21. Linux Kernel Architecture • Monolithic kernel: Contains modular components – Process management – Interprocess communication – Memory management – File system management • VFS: provides a single file system interface – I/O management – Networking
  • 24. 24 Introduction • File system – How are data stored in storage? – How do users access the data? • Data organization, files and directories • File system types – Disk FS: ext2, ext3, FAT, FAT32 & NTFS – Network FS: Samba & NFS – Flash FS: JFFS2 – Special FS: proc FS
  • 25. 25 Introduction (cont’d) • You should understand Linux FS – Why? • Everything in Linux is file, if it is NOT process – Easy to use • Open file, read/write and close the file • Unlike Windows, Linux FS is standard FS – Everyone should learn standards
  • 26. 26 File system Hierarchy Standard • There is not any drive C:, D:, … • All directories are under “/” – “/” is the root directory • It is possible – to have multiple partitions – to multiple file systems
  • 27. 27 The “/” • The primary hierarchy in FSH – The root of tree of file system • All paths start form here • There is only one “/” in file system
  • 29. 29 boot • Linux kernel • Boot loader configuration • If you lost boot – You cannot boot your OS
  • 31. 31 bin • Essential programs • Need for system startup • Basic commands for – Navigating in filesystem – File management
  • 33. 33 dev • Everything is file – Hardware components (devices) are file • Hard disk • Key board • All device files are here • Direct interaction with device driver – Open the device file – Read & Write
  • 35. 35 etc • System configuration directory – What is done by the registry in Windows • All configuration file are text files – You can view and edit it manually
  • 37. 37 home • Home directory of user • Each user has a directory – /home/bahador – /home/hamed • All files of user are stored here
  • 38. 38 lib • Programs need libraries – Dynamically linked libraries • Programmers need libraries • All essential libraries are here – Needed for system startup
  • 40. 40 proc • Kernel’s interface – Kernel pseudo-directory • Special directory – It is NOT a directory on hard disk • Kernel Configuration • Kernel State monitoring
  • 42. 42 root • Home directory of root • Don’t confuse – / is the “root of File system” – root is the name of system admin – /root is the admin
  • 43. 43 sbin • System configuration programs – Format hard disk – Manage hardware • Only “root” can run the programs
  • 45. 45 tmp • Temporary directory • All temp files are created by programs • Your temp files • It is emptied regularly
  • 46. 46 usr • Secondary hierarchy • Very useful programs – We usually use them • compiler, tools • Are not essential for system startup
  • 48. 48 var • The variable directory • All dynamic files • User cannot change the files
  • 50. 50 Permissions • There are 3 basic permissions – Read (r) – Write (w) – Execute (x) • How to find them – ls -l • How to change them – chmod +/- r/w/x <filename>
  • 52. Linux Memory Management • Allocates memory space to each process – e.g., In Intel X86, Linux allocates 1 GB of high order memory to kernel and 3 GB of memory to executing processes • Address space is divided among: – Process code – Process data – Code and shared library data used by process – Stack used by process
  • 53. Linux Memory Management (continued) • Linux has system calls that change size of process data segment as required • Offers memory protection based on type of information stored • When kernel needs memory space, pages are released using LRU algorithm • Maintains a dynamically managed area in memory, a page cache
  • 54. Linux Memory Management (continued) • If any pages marked for deletion have been modified, they’re rewritten to disk – Page corresponding to file mapped into memory is rewritten to file – Page corresponding to data is saved on swap device • Linux uses system of page table to keep track of free and busy pages • Uses virtual memory mechanism
  • 58. PWD • PWD • Present working Directory • Display the absolute path of the current directory.
  • 59. The absolute path of the root directory is displayed. PWD
  • 60. ls • ls : • List the Files and Directories within the current directory. • Syntax: • ls [options] • Options: • -l List file with permission. • -a List hidden file. • -i List files and inode number. • -R List directories , sub directories
  • 61. ls Lists the files and directories in the present directory.
  • 62. ls -l l option lists the long listing of Files and directory.
  • 63. l l command File or directory names. Time stamp Size of the files or directories The name of the group which has the permissions over the files or directories Owner name, the user who created the directory. No of links to the directory It defines the permissions assigned to the owners, groups and other users
  • 64. ls -a [a] option lists all files and directories including hidden files
  • 65. ls -al al option lists all files and directories including hidden files in long listin format.
  • 66. ls -R [R] option lists working directory as well as contents in the directory.
  • 67. mkdir • mkdir : • Make directory (or) To create a directory • Syntax : mkdir <dirname>
  • 68. cd • cd • Change directories • Syntax : cd <directory name> • cd .. To a directory one level up (parent directory) • cd - To your previous working directory • cd / To the / (slash) directory
  • 69. cd – cd - command will take you to the previous working directory Here the current directory is newdir when we enter cd -, it takes to the previously worked directory. Again cd - is given as shown. Now it will take to the previously worked directory i.e., (newdir)
  • 70. cat • cat – it is the command to create and view files • Syntax: • cat [options] [filename] cat > [filename] → To create a file cat [filename] → To view a file cat >> [filename] → To append text to a file
  • 71. cat As mentioned in the previous slide. cat is used to create a file The file is saved through ctrl -d after typing the text
  • 72. cat Enter cat <filename> to view the content of file.
  • 73. cat To append the text in a file, Cat >> (symbol) and file name.
  • 74. cat The screen shows the appended file
  • 75. The -s option trims multiple adjacent blank lines into single blank line cat
  • 76. The –b option numbers the each text line of the output
  • 77. cat The –A option shows all characters including control and non printing characters Here the $ represents the end of the line
  • 78. touch • touch command is used to update the time stamps of a file. • touch is also used to create new empty file. – Syntax : touch [filename] • touch can create multiple empty file too. – Syntax : touch [filename1] [filename2]
  • 79. touch Here the empty file is created
  • 80. Multiple files are created using touch command touch
  • 81. Copy Command • cp : cp command is known for copying files and directories. Syntax : cp [options] source destination Options : -r recursively copy an entire directory tree -p preserve permissions, ownership, and time stamps – Example : cp File1 File2
  • 82. There is a file named ‘a’ in the directory test . Copy Command
  • 83. Here we notice that test1 is a empty directory. Let us copy the file ‘a’ into this directory. Copy Command
  • 84. Cp copies the file ‘a’ from the directory test to the directory test1. Copy Command
  • 85. Thus the file ‘a’ is copied to the test1 directory. Copy Command
  • 86. Directories new and old are listed with their contents. Copy Command
  • 87. -r option copy the entire directory tree ‘old’ Copy Command
  • 88. Copy Command Thus the contents of old directory is copied to new directory.
  • 89. Copy Command Command l l shows the permission of the file
  • 90. Copy Command Using chmod, permission of the file is changed
  • 91. Copy Command Now, we copy the file one to the directory old
  • 92. Copy Command See the comparison of the file one shown above in the new and old directory
  • 93. Copy Command Now using command cp along with –p option the permission is preserved.
  • 94. •mv : This command is used to move and renaming files and directories •Syntax: mv <source> <destination> Example mv file1 file2 (now the file1 is changed to file2) Move Command
  • 95. Move Command A file is available in the name of one in the directory old
  • 96. Move Command Here we see that using mv command the file is moved from old to new directory.
  • 97. Move Command Now check into the old directory where the file one is moved. Hence the directory is empty
  • 98. Move Command The file one is shown above in the new directory
  • 99. Move Command Here a file is created test in the old directory
  • 100. Move Command This example shows how to rename a file test to tested
  • 101. Move Command Using the l l command, the above screen shows the renamed file
  • 102. rm and rmdir command • rm : This command is used to remove files Syntax: rm <filename> Example : rm file1 • rmdir : This command is used to remove directories. • Syntax: rmdir <directory name> Example : rmdir linux
  • 103. This screen shows the contents of the new directory rm command The above rm command is used to remove the file k
  • 104. Here the file named k is removed from the directory rm command
  • 105. Here a directory is created named donic which is removed through the command rmdir rmdir command
  • 106. The above screen shows that directory donic is removed rmdir command
  • 107. In the above screen we see that directory tomy is unable to remove rmdir command
  • 108. Using rm with option – r, the directory along with contents can be removed rm command
  • 109. Now the above screen shows that the directory is removed rm -r command
  • 110. The above screen shows the contents of directory jerry rm command
  • 111. The rm with –ri command is used to remove the contents interactively. rm -ri command
  • 112. We can see that the file for which we have given ‘y’ is removed and ‘n’ is preserved rm -ri command
  • 113. • The file command is used to check the file content. • Syntax : file <filename> • Example: file f1 (f1 is a file. File will show the format) • file /dev/fd0 (The output shows that the fd0 is a block special file) File command
  • 114. File format The file along with file name (ss) shows the file format
  • 115. This shows the format of the file cat as executable file File format
  • 116. more l l command shows the contents at once.
  • 117. more l l lists the content quickly, which makes the viewer to see only last page
  • 118. more More is used to lists the contents one screen at a time
  • 119. more More is been prompted after listing one by one
  • 120. more Here it is the same process listing more contents, shown as above
  • 121. more Here it is the same process listing more contents, shown as above
  • 122. more Now the more command is over and we are in the end of the page
  • 123. vi & vim editor ➢Vi is known as the visual editor. ➢It is a standard editor under Linux and Unix system. ➢Vim is the improved version of vi editor ➢Vi have three modes of operation Command mode Insert mode Esc mode
  • 124. vi Modes • Command mode: • Operations such as cut, copy, paste, delete, undo, redo etc., are done in this mode. • Insert mode: • Type in new text • Ex-mode : • Extended commands for saving, exiting, search-and- replace can executed here
  • 125. Working with vi editor exam is a file created or opened with the vi editor.
  • 126. Command Mode Press ‘i’ to get into the insert mode
  • 127. Insert Mode This is the insert mode
  • 128. After typing the data’s hit escape to get into command mode Insert Mode
  • 129. Ex- Mode Press :wq to write and quit
  • 130. Ex- Mode Press q! to quit without saving the data
  • 131. Yank Hit escape and type 3yy to yank three lines from the cursor position Like this example, you can copy any number of lines by typing numbers of lines and yy
  • 132. In the previous slide, we saw how to yank the text. After yanking we see the message as below Text yanked
  • 133. Now the yanked text is pasted from the cursor position by hitting the ‘p‘ Text put
  • 134. delete To delete text, place the cursor in the beginning of the line and give the total number and dd
  • 135. Now 3 lines are deleted and message get displayed as 3 fewer lines as shown below delete
  • 136. cut and put To cut a line after curser position hit 1cc.
  • 137. Get into insert mode and place the cursor where the data should be pasted. Press esc to get in to command mode cut and put
  • 138. Now hit p to paste the data. cut and put
  • 139. Search Get into ex mode type / followed by data to be searched and press enter
  • 140. When we press enter it shows the first found match from bottom to top. Search
  • 141. Then if we press ‘n’ it will shows the second match for that data.If we continue pressing n it will show successive matches. Search
  • 142. Find command • Find: To search files and directories in a specified path. • Syntax: find <directory> [conditions] [action] • Condition: -name <file name> - to search a particular file • -user <user name> - lists the files owned by user. • -perm <mode> - search a file depending on permission.
  • 143. This command searches the password file from / directory. Find command
  • 144. The above screen shows the execution of command Find command
  • 145. Locate command • Locate: • To search or locate files and directories from the database. • It locate the files faster than the find command • Syntax: • locate [pattern]
  • 146. To search file named test1 from database. Locate command
  • 147. All the files and directories named test1 is located and displayed. Locate command
  • 148. • man : Display helpful information about commands. • Syntax: • man [option] command • Option: • –k - search by command description rather than command name. Man command
  • 149. Man command It displays manual pages for ls command.
  • 150. Man command The manual page of ls command is displayed here. Enter q to exit from manual page.
  • 151. • useradd : • To create a new user account and login directory for that new account. • Useradd will create new entries in system files. • Syntax : useradd [options] [user] • Options • -c Comment field. -d Home directory • -e Account expiration date. useradd command
  • 152. useradd command User named abdulkalam is created. To set password for abdulkalam.
  • 154. User home directory When new user account is created ,a login directory for the user is created in /home dir.
  • 155. User configuration files • When a new user account is created, its entries updates the following system files. • - /etc/passwd • - /etc/group • - /etc/shadow
  • 156. Passwd file To view password configuration file.
  • 157. Passwd file First field represent username. x represents encrypted password is available in shadow file. User id. Group id. User home directory. User login shell.
  • 158. Group id for the user abdulkalam. Groups file
  • 160. User login User home dir or login dir
  • 161. User account can be deleted through userdel command userdel command
  • 162. Creating groups • New group is created by hand-editing the file /etc/group or by using groupadd command. • Syntax: groupadd groupname • groupdel command is used to remove the group. • Syntax groupdel groupname • Groupmod is used to rename the existing groupname. • Syntax: groupmod –n newname oldname
  • 163. Groupadd command A group is added in the name of india by using the command groupadd.
  • 164. Usermod command Using usermod command the user abdulkalam is added to group India
  • 165. Groups file To view group file
  • 166. The last field shows the user abdulkalam added in India group Groups file The id number assigned to the group india is 501
  • 167. Groupdel command Groupdel command deletes window group.
  • 168. Group Administration Create a directory named product and group named sales.
  • 169. User’s are added in the sales group using usermod command. Group Administration
  • 170. Open the group file. Group Administration
  • 171. This shows that the three users are added in the sales group. Group Administration
  • 172. Change the group name sales to product directory using chgrp command. Group Administration
  • 173. The screen shows that the changes been made in the group field. Group Administration
  • 174. Three files created under product directory. Group Administration
  • 175. The permission for the product directory is changed. Group Administration
  • 176. The user tom is not a member of the group. So the permission is restricted. Group Administration
  • 177. suresh logs in terminal. As he is the member of the group, he have the privilege to access the file. Group Administration
  • 178. rajesh logs in terminal. As he is the member of the group, he have the privilege to access the file. Group Administration
  • 179. tom logs in terminal. he is not the member of the group so does not have the privilege to access the file. Group Administration
  • 180. The above screen shows the permission been restricted to the user tom. Group Administration
  • 181. Changing owner The chown command change the file or directory owner. After giving the chown command the owner is changed from root to suresh.
  • 182. Changing owner The owner and group name can be change using chown command.
  • 183. User administration Chage –l : lists the account and password information of user tom. This field sets the password for the maximum valid days given. Inactive period is used to give grace time to change the password.
  • 184. User administration The –M command with 100 sets as the maximum days. The password expires field is updated by +100 days from user creation date.
  • 185. User administration Allowable account inactivity period after which password will expire.
  • 186. User administration The -W option shows the warning message before expiration.
  • 187. User administration The -m option for minimum number of days a user can exists with password.
  • 188. The -E option is for specific expiration date for an account. User administration
  • 189. Set userID • It allows an executable file to run under the user or group security context with the permission of its owner. • SUID can be set as follows: • chmod u+s [filename] (or) • chmod 4xxx [filename]
  • 190. The above screen shows file shadow and password along with the set user id permission. The passwd is the command which updates the password in the shadow file, instead of not having the execute permission. Set userID
  • 191. Tom changes the password using passwd command. Set userID
  • 192. The set userid permission is removed from the /usr/bin/passwd file. Set userID
  • 193. Now we can view that tom user cannot change the password. Set userID
  • 194. Set GroupID The user suresh logs get into the product directory and create a file. The user suresh who create a file, the group name is assigned as suresh.
  • 195. The groupid is set to the product directory. Note: the group sales is added to the product directory. Set GroupID
  • 196. After setting the group id, user suresh creates a file win98. Using the command ls –l shows that the file is created under the group sales. Set GroupID