Lab 1
Lab 1
Lab 1
OPERATING SYSTEM
Lab-01
Student Name
Student Roll #
Department
Year/Section
LAB 1(Introduction to Operating System)
server could run non-stop without a reboot for years on end. Is it for me?
Users, who are new to Linux, usually shun it by falsely considering it as a difficult and technical
OS to operate but, to state the truth, in the last few years Linux operating systems have become a
lot more user-friendly than their counterparts like Windows, so trying them is the best way to
know whether Linux suits you or not.
There are thousands of Linux based operating systems; most of them offer state-of-the-art
security and applications, all of it for free!
9. Linux OS is most secure than Windows 10. In Microsoft Windows, files are stored in
OS. Until now, 150 viruses have been folders under different data drives like C:
reported to Linux. D: E:
10. But, in Linux, files are ordered in a tree 11. In Windows, you cannot have 2 files with
structure starting with the root directory. the same name in the same folder.
Directories in Linux:
• UNIX/ Linux has a hierarchical file system structure consisting of a root directory
(denoted as /) with other directories and files hanging under it.
• UNIX/ Linux uses a directory hierarchy that is commonly represented as folders.
• However, instead of using graphical folders typed commands (in a command line user
interface) are used to navigate the system.
• Particular files are then represented by paths and filenames much like they are in html
addresses.
• A pathname is the list of directories separated by slashes (/).
• If a pathname starts with a /, it refers to the root directory. The last component of a path
may be a file or a directory.
• A pathname may simply be a file or directory name. For example,
/usr/include/sys/prgm.h, ~/courses/cs604, and prog1.c are pathnames.
• When you log in, the system places you in a directory called your home directory (also
called login directory)
• Shells also understand both relative and absolute pathnames.
• An absolute pathname starts with the root directory (/) and a relative pathname starts with
your home directory, your current directory, or the parent of your current directory (the
directory that you are currently in).
• For example, /usr/include/sys/param.h is an absolute pathname and ~/courses/cs604 and
prog1.c are relative pathnames.
• Figures 4.5 and 4.6 show sample directory structures in a UNIX/Linux system. The user nadeem
has a subdirectory under his home directory, called courses. This directory contains
subdirectories for the courses that you have taken, including one for this course.
Directory Structure
Task to DO
1. Write here the types of Files and detail store in these directories.
/bin:
/boot:
/cdrom:
/dev:
/etc:
/ home:
/lib:
/Lost+found:
/media:
/mnt:
/opt:
/proc:
/root:
/run:
/sbin:
/selinux:
/srv:
/sys:
/tmp:
/usr:
/var:
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------