Mais conteúdo relacionado
Semelhante a 01 t1 s2_linux_lesson1 (20)
01 t1 s2_linux_lesson1
- 1. Introduction to the Linux Operating System
Objectives
In this lesson, you will learn to:
Identify the functions of an operating system
Differentiate between single-user and multi-user
operating systems
Identify the inception, growth, features, and
architecture of Linux
Identify the various shells available in Linux
Start a Linux session
List the users who are currently logged in
©NIIT Linux/Lesson 1/Slide 1 of 32
- 2. Introduction to the Linux Operating System
Objectives(contd.)
Assign passwords to a Linux user using the passwd
command
End a Linux session
Identify the features of the Linux filesystem
Create a directory using the mkdir command
Delete a directory using the rmdir command
List the contents of a directory using the ls command
Copy a file using the cp command
©NIIT Linux/Lesson 1/Slide 2 of 32
- 3. Introduction to the Linux Operating System
Objectives(contd.)
Move a file using the mv command
Delete a file using the rm command
Use man command to get online help
©NIIT Linux/Lesson 1/Slide 3 of 32
- 4. Introduction to the Linux Operating System
Getting Started
Operating Systems
An operating system (OS) is a software program
that acts as an interface between a user and a
computer, e.g Linux, Unix, Microsoft DOS etc
Functions of an Operating System
Command Interpretation
Process Management
Memory Management
I/O Operations and Peripheral Management
File management
©NIIT Linux/Lesson 1/Slide 4 of 32
- 5. Introduction to the Linux Operating System
Getting Started(contd.)
Types Of Systems
Single-User Systems
®A single-user system was designed for use by
one person at a time. A personal computer (PC)
is a popular single-user system
Single–User Operating Systems
® MSDOS (Disk Operating System) is an
example of a single-user operating system
©NIIT Linux/Lesson 1/Slide 5 of 32
- 6. Introduction to the Linux Operating System
Getting Started(contd.)
Types Of Systems(contd.)
Multi-User Systems
® More than one user can work simultaneously on
a multi-user system
Printer
Communication Lines
Multi-user System
System Unit
-Processor
-Disk(s)
-Tape(s)
-Floppy Disk(s) Graphical or text Remote User
System Console Terminals Terminals
©NIIT Linux/Lesson 1/Slide 6 of 32
- 7. Introduction to the Linux Operating System
Getting Started(contd.)
Types Of Systems(contd.)
Multi–User Operating Systems
® Linux,
Unix, and Windows NT Terminal Server
are examples of multi-user operating systems
® Morethan one user can connect to the system
and work concurrently at any point in time
©NIIT Linux/Lesson 1/Slide 7 of 32
- 8. Introduction to the Linux Operating System
Flavours of Linux
Distributor Name Website
Red Hat http://www.redhat.com
Caldera http://www.caldera.com
Mandrake http://www.linux-mandrake.com
Debian http://www.debian.org
SuSE http://www.suse.com
Slackware http://www.slackware.com
©NIIT Linux/Lesson 1/Slide 8 of 32
- 9. Introduction to the Linux Operating System
The Linux Architecture
The Linux operating system consists of the following:
Kernel
Shell
Utilities and Application Programs
©NIIT Linux/Lesson 1/Slide 9 of 32
- 10. Introduction to the Linux Operating System
Shells Available in Linux
Bourne Shell (sh)
C Shell (csh)
Korn Shell (ksh)
Restricted Shell (rsh)
Bash Shell (bash)
Tcsh Shell (tcsh)
A Shell (ash)
Z Shell (zsh)
©NIIT Linux/Lesson 1/Slide 10 of 32
- 11. Introduction to the Linux Operating System
Starting a Linux Session: Logging on
Connect to a computer running the Linux operating
system from any other computer using the telnet
program
telnet hostname or IP address
The administrator assigns each user a HOME
directory when a new logon account is created. When
you log on, you are taken directly to your HOME
directory
©NIIT Linux/Lesson 1/Slide 11 of 32
- 12. Introduction to the Linux Operating System
Listing the Users Currently Logged In
A list of users who are currently logged in can be
found by using the who command
who [options]
©NIIT Linux/Lesson 1/Slide 12 of 32
- 13. Introduction to the Linux Operating System
Security for the Users: Passwords
Linux provides an additional measure of security by
allowing you to have a password associated with your
login name
The combination of the login name and password is
checked by Linux to verify if it is an authorized user
Changing the User Password
Passwords can be changed using the passwd
command
The passwd command asks for the old password to
ensure that only the authorized user is trying to
change the password
©NIIT Linux/Lesson 1/Slide 13 of 32
- 14. Introduction to the Linux Operating System
Root user:
The root user (also known as the superuser) is the
administrator of the Linux operating system
Ending a Linux Session: Logging out
Typing exit or logout at the command prompt ends
your current Linux session. You can also press
CTRL+d to end the Linux session
©NIIT Linux/Lesson 1/Slide 14 of 32
- 15. Introduction to the Linux Operating System
The Linux Filesystem
/
bin boot home etc usr dev
cat cp ch ls
m tom michael user3
od
Desktop Templates pr pr
og og
ra ra
m m
1 2 Legend
De St
fa ar Directory
ul t
t File
©NIIT Linux/Lesson 1/Slide 15 of 32
- 16. Introduction to the Linux Operating System
The Linux Filesystem (contd.)
The /bin directory stores many utilities of Linux
The /dev directory stores all the device-related files for
the system
The /etc directory stores the operating system-related
data which users and the operating system need to
refer to, such as the passwd file
The /lib directory contains libraries of data for the
compilers installed in the Linux operating system, for
example, the C language routines
The /home directory generally contains all the HOME
directories of users
©NIIT Linux/Lesson 1/Slide 16 of 32
- 17. Introduction to the Linux Operating System
The Linux Filesystem (contd.)
The /usr directory stores the operating system files
that are not involved in the boot process
The /var directory has information specific to different
utilities of Linux
©NIIT Linux/Lesson 1/Slide 17 of 32
- 18. Introduction to the Linux Operating System
In Linux, File Names:
Can be up to 256 characters long
Can contain special characters, except for ‘/’
Can contain both uppercase and lowercase letters of
alphabets
Are case-sensitive
Should not have a blank or a tab
©NIIT Linux/Lesson 1/Slide 18 of 32
- 19. Introduction to the Linux Operating System
Types of Files in Linux
File Types
Ordinary files Directory files Special files
Character Block Hard links Symbolic
Device files Device files links
©NIIT Linux/Lesson 1/Slide 19 of 32
- 20. Introduction to the Linux Operating System
Types of Users in Linux
System Administrator
A System Administrator (SA) is primarily
responsible for the smooth operation of the Linux
operating system
File Owner
The user who creates a file is said to be its owner
Group Owner
A group of users is also given a name, just as a
user is given a name
Other Users
These are users who do not belong to a particular
group
©NIIT Linux/Lesson 1/Slide 20 of 32
- 21. Introduction to the Linux Operating System
Directory Commands in Linux
Identifying the Current Directory Path
The pwd (print working directory) command is used
to display the full path name of the current
directory
Changing the Current Directory
The cd (change directory) command changes the
current directory to the directory specified
Creating a Directory
The mkdir (make directory) command is used to
create directories
©NIIT Linux/Lesson 1/Slide 21 of 32
- 22. Introduction to the Linux Operating System
Directory Commands in Linux (contd.)
Removing a Directory
The rmdir (remove directory) command removes
the directory specified
Listing the Contents of a Directory
The ls command is used to display the names of
the files and sub-directories in a directory
©NIIT Linux/Lesson 1/Slide 22 of 32
- 23. Introduction to the Linux Operating System
File Commands in Linux
The cat (concatenate) command displays the
contents of the specified file
Copying Files
The cp (copy) command duplicates the contents of
the source file into a target file
cp [options] source file/s destination
directory/file
Removing Files
The rm (remove) command is used to delete files
or directories
rm [options] file/s
©NIIT Linux/Lesson 1/Slide 23 of 32
- 24. Introduction to the Linux Operating System
File Commands in Linux (contd.)
Moving and Renaming Files
The mv (move) command is used to move a file or
directory from one location to another or to change
its name
mv [option] source destination
Displaying the Contents Page–Wise
The more command is used to display data one
screen-full at a time. While viewing a file using the
more command, once you have scrolled down, you
cannot move up
more [options] filename
©NIIT Linux/Lesson 1/Slide 24 of 32
- 25. Introduction to the Linux Operating System
File Commands in Linux (contd.)
Displaying the Contents Page–Wise (contd.)
The less command is similar to the more
command except that you can scroll upwards also
while viewing the contents of a file
less [options] filename
Wildcard Characters
The shell offers the facility to perform an operation on
a set of files by the use of certain special characters in
the command in place of the actual file names
©NIIT Linux/Lesson 1/Slide 25 of 32
- 26. Introduction to the Linux Operating System
File Commands in Linux (contd.)
Wildcard Characters (contd.)
The * Wildcard
The * wildcard is interpreted as a string of none,
one, or more characters
The ? Wildcard
The ? wildcard matches exactly one occurrence of
any character
The [ ] Wildcard
The [ ] wildcard can be used to restrict the
characters to be matched
©NIIT Linux/Lesson 1/Slide 26 of 32
- 27. Introduction to the Linux Operating System
Getting Online Help
The man command is used to get online help to a
user about the various options for any command in
Linux
man command name
©NIIT Linux/Lesson 1/Slide 27 of 32
- 28. Introduction to the Linux Operating System
Summary
In this lesson you learned that:
An operating system has the following functions:
Command Interpretation
Process Management
Memory Management
I/O Operations and Peripheral Management
File Management
A single-user system is designed for use by one
person at a time
More than one user can work simultaneously on a
multi-user system
©NIIT Linux/Lesson 1/Slide 28 of 32
- 29. Introduction to the Linux Operating System
Summary(contd.)
The Linux operating system consists of kernel, shell,
utilities, and application programs
Some of the commonly available shells in Linux along
with their executable file names are:
The Bourne shell (sh)
the C shell (csh)
The Korn shell (ksh)
The Restricted shell (rsh)
The Bash shell (bash)
The Tcsh shell (csh/tcsh)
©NIIT Linux/Lesson 1/Slide 29 of 32
- 30. Introduction to the Linux Operating System
Summary(contd.)
The A shell (ash)
The Z shell (zsh)
The telnet command is used to connect to a Linux
server
The passwd command is used to change the
password of the user
For organizing data on the disk, Linux provides a
filesystem which allows you to group files in a
convenient manner. The Linux filesystem has a
hierarchical structure and files can be stored under
directories
©NIIT Linux/Lesson 1/Slide 30 of 32
- 31. Introduction to the Linux Operating System
Summary(contd.)
In Linux, there are three categories of files:
Ordinary files
Directory files
Special files
The types of users in Linux are:
System Administrator
File owner
Group owner
Other users
©NIIT Linux/Lesson 1/Slide 31 of 32
- 32. Introduction to the Linux Operating System
Summary(contd.)
In Linux, chat and e-mail programs are used to
communicate with each other.
©NIIT Linux/Lesson 1/Slide 32 of 32