Linux Operating System
Linux Operating System
UNIT 3
UNIX/LINUX OPERATING SYSTEM
Introduction to Unix
History of UNIX
What is LINUX
LINUX Distributions
Unix OS Structure
Unix File System
Unix Directories, Files and Inodes
Users, Groups and Permissions
1
Introduction to Linux
UNIX
2
Introduction to Linux
History of UNIX
History of UNIX
1973 Unix is re-written mostly in C, a new language
developed by Dennis Ritchie.
Being written in this high-level language greatly
decreased the effort needed to port it to new
machines.
4
Introduction to Linux
History of UNIX
5
Introduction to Linux
What is LINUX
6
Introduction to Linux
LINUX Distributions
Mandrake: http://www.mandrakesoft.com/
RedHat: http://www.redhat.com/
Fedora: http://fedora.redhat.com/
SuSE/Novell: http://www.suse.com/
Debian: http://www.debian.org/
UNIX Structure
8
Introduction to Linux
9
Introduction to Linux
File System
10
Introduction to Linux
File System
Each node is either a file or a directory of files,
where the latter can contain other files and
directories.
You specify a file or directory by its path name,
either the full, or absolute, path name or the one
relative to a location.
The full path name starts with the root, /, and
follows the branches of the file system, each
separated by /, until you reach the desired file,
e.g.:
/home/condron/source/xntp
11
Introduction to Linux
File System
A relative path name specifies the path relative to
another, usually the current working directory that
you are at. Two special directories :
. the current directory
.. the parent of the current directory
So if I'm at /home/frank and wish to specify the path
above in a relative fashion I could use:
../condron/source/xntp
This indicates that I should first go up one directory
level, then come down through the condron directory,
followed by the source directory and then to xntp.
12
Introduction to Linux
13
Introduction to Linux
14
Introduction to Linux
Structure of Standard Directories
in Unix/Linux
/sbin Essential system administrator tools, or
system binaries.
/tmp Temporary files.
/usr Subdirectories with files related to user tools
and applications.
15
Introduction to Linux
17
Introduction to Linux
Access Permissions
There are three permissions for any file, directory
or application program.
Access Permissions
Each of the three permissions are assigned to
three defined categories of users.
The categories are:
19
Introduction to Linux
Access Permissions
One can easily view the permissions for a file by
invoking a long format listing using the command
ls -l.
20
Introduction to Linux
Access Permissions
The permissions for this file are listed are listed at
the start of the line, starting with rwx.
21
Introduction to Linux
Access Permissions
This listing indicates that the file is readable,
writable, and executable by the user who owns the
file (user juan) as well as the group owning the file
(which is a group named student).
22
Introduction to Linux
$ ls –l
23
Introduction to Linux
Moving in Directories
cd try_it
Changes the directory to try_it
pwd
Prints present working directory (e.g.
/home/smith/try_it)
cd .. Move to superior directory
pwd : Prints /home/smith
cd /home The absolute path
pwd : Prints /home
cd The system is returned to the user home
directory
pwd : Print /home/smith
24
Introduction to Linux
Make Directory
25
Introduction to Linux
Remove Directory
26
Introduction to Linux
Copy File
27
Introduction to Linux
28
Introduction to Linux
Remove File
The command rm file_a
removes the file_a from the system
If you use wildcard. For example
rm h*c
you will remove all files beginning with h and
ending with c which are in working directory.
If you write
rm *
you will erase all files from your working directory.
29
Introduction to Linux
31
Introduction to Linux
Assignment
Login as guest (password is guest)
Find the present Directory
Write the root directory structure
Write a few commands available in /bin and /sbin directory
Find the guest directory
Write the permissions of guest directory
Create a new Directory test in guest directory
Copy the file /etc/resolv.conf in test directory
Rename the test directory to testing
Delete the testing directory
Change the permissions of guest directory to 700
32
Change the permissions of /tmp directory to 700