Data Communication and Network
Data Communication and Network
02-134201-042
BS(CS) – 5B
Lab 01 Tasks
(Commands)
Semester 5 (Fall 2022)
EXERCISES
Exercise 1
Linux file system is generally a built-in layer of a Linux operating system used to handle the data
management of the storage. It helps to arrange the file on the disk storage. It manages the file
name, file size, creation date, and much more information about a file. Linux file system has a
hierarchal file structure as it contains a root directory and its subdirectories. All other directories
can be accessed from the root directory. A partition usually has only one file system, but it may
have more than one file system. A file system is designed in a way so that it can manage and
provide space for non-volatile storage data.
Kernel
Hardware
The superblock incorporates information on the size of the document machine, the range of inodes, the number
of facts blocks, the free and used inodes, and the block size for the file machine. The superblock is kept in
memory and in multiple locations on disk for each file system. The superblock is essentially file system metadata
and defines the file system type, size, status, and information about other metadata structures (metadata of
metadata). The superblock is very critical to the file system and therefore is stored in multiple redundant copies
for each file system. The superblock is a very "high level" metadata structure for the file system.
The root directory is a directory in Unix-like operating systems that contains all other directories and files on a
system and is marked by a slash (/). The file system is the hierarchy of directories used to organize files on a
computer. The use of the word "root" in this context results from the fact that the root directory at the top can
be illustrated as the "root" of an upside-down tree structure.
4. What is Lilo?
LILO (LInux LOader) is a boot loader (a small program that manages a dual boot) for use with the Linux
operating system. Most new computers are shipped with boot loaders for some version of Microsoft Windows
or the Mac OS. If a computer is to be used with Linux, a special boot loader must be installed. LILO is the most
popular boot loader among users who employ Linux as their main, or only, operating system.
The /dev/ directory consists of files that represent devices that are attached to the local system. However, these
are not regular files that a user can read and write to; these files are called devices files or special files:
Nafay Ur Rehman
02-134201-042
BS(CS) – 5B
Device files are abstractions of standard devices that applications interact with via I/O system calls. The
device files that correspond to hardware devices fall into two main categories. Mainly character special files and
block special files.
The /etc hierarchy contains configuration files. A "configuration file" is a local file used to control the operation
of a program; it must be static and cannot be an executable binary. The /etc maintains a lot of files. Some of
them are described below. For others, you should determine which program they belong to and read the
manual page for that program. Many networking configuration files are in /etc as well, and are described in
the Networking Administrators' Guide.
/etc/inittab
/etc/shadow
/etc/passwd
The user database, with fields giving the username, real name, home directory, and other information about
each user. The format is documented in the passwd manual page.
/etc/rc or /etc/rc.d or /etc/rc?.d
Scripts or directories of scripts to run at startup or when changing the run level.
Nafay Ur Rehman
02-134201-042
BS(CS) – 5B
7. What is the purpose of /usr? Where the code for Linux kernel is kept?
/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means
that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any
information that is host-specific or varies with time is stored elsewhere.Large software packages must not use
a direct subdirectory under the /usr hierarchy. The Linux kernel is stored in /boot. The files like “vmlinuz” are
the kernel.
8. What is MBR?
Partition Table
Boot
Bootstrap Signature
Code Partition 1 Partition 2
(0x55
0xaa)
Partition 3 Partition 4
Exercise 2
1 cat
2 find
3 read
4 more
5 env
6 echo
7 export
8 history
9 source
10 ps
Exercise 3