You are on page 1of 16

LAB MANUAL

NAME: MUHAMMAD MUNEEB

REG NO: 2021-CS-55

SUBJECT: OPERATING SYSTEM

SUBMITTED TO: MR. TALHA JAHANGIR

LAB NO # 01
WHAT IS OPERATING SYSTEM?
An Operating System (OS) is an interface between a computer user
and computer hardware. An operating system is software which performs
all the basic tasks like file management, memory management, process
management, handling input and output, and controlling peripheral
devices such as disk drives and printers.
An operating system is software that enables applications to interact with
a computer's hardware. The software that contains the core components
of the operating system is called the kernel.
The primary purposes of an Operating System are to enable applications
(software) to interact with a computer's hardware and to manage a
system's hardware and software resources.
Some popular Operating Systems include Linux Operating System,
Windows Operating System, VMS, OS/400, AIX, z/OS, etc. Today,
Operating systems is found almost in every device like mobile phones,
personal computers, mainframe computers, automobiles, TV, Toys etc.
Types of Operating Systems:
There are several types of operating systems, and they can be broadly
categorized into the following:
1) Single-User, Single-Tasking OS:
This type can handle only one user and one task at a time. Early personal
computers used these. Imagine an old computer that could only run one
program at a time.

2) Single-User, Multi-Tasking OS:


Most modern personal computers use this type. It allows one user to
run multiple applications simultaneously. For example, you can listen to
music, browse the web, and work on a document all at once.
3) Multi-User OS:
These operating systems are used on powerful servers that can support
multiple users simultaneously. They're commonly seen in business
environments where many people need access to the same resources.
4) Real-Time OS (RTOS):
RTOS is used in situations where computer systems must respond to
events within strict time constraints. Think of industries like aviation,
where split-second decisions are crucial.
5) Mobile OS:
These are designed for smartphones and tablets. Examples include
Android and iOS. They are optimized for touchscreens and mobile apps.
6) Embedded OS:
Found in devices like appliances, cars, and even some toys. They're built
into the device and control its functions. You may not even realize you're
interacting with an OS in these cases.
7) Distributed OS:
These OSs manage a network of computers and ensure they work
together efficiently. They are used in data centers and for cloud
computing.

WHAT IS FHS?
FHS Stands for Filesystem Hierarchy Standard. The Filesystem
Hierarchy Standard (FHS) is a set of guidelines and conventions that
dictate the structure and organization of the file system on Unix-like
operating systems, including Linux. It defines where different types of
files and directories should be located to ensure consistency and
interoperability across different Linux distributions and Unix-like
systems.
Here's a more detailed explanation of FHS:
1) / (Root Directory):
The root directory is the top-level directory in the file system hierarchy.
Everything starts from here, and it contains all other directories and files.
It is represented as a single forward slash (/).
2) /bin (Essential User Binaries):
This directory contains essential command binaries that are required
for system maintenance and recovery. These binaries are needed before
the root file system is mounted or while the system is in rescue mode.
3) /boot (Boot Loader Files):
The /boot directory contains files required for the system's boot process,
including the kernel, bootloader configuration, and instreams images.
4) /dev (Device Files):
This directory contains special device files that represent and allow
access to hardware devices and drivers in the system, such as hard drives,
terminals, and more.

5) /etc (System Configuration Files):


Configuration files and directories related to the system and various
installed software packages are stored here. It includes network
configuration, system-wide configuration files, and startup scripts.
6) /home (Home Directories):
User home directories are located in this directory. Each user typically
has their own subdirectory within /home where they store their personal
files and configurations.
7) /lib (System Libraries):
This directory contains shared library files that are essential for the
operation of the system and installed software packages.
8) /media (Removable Media Mount Point):
This directory is used as a mount point for removable media devices
such as USB drives and CDs.
9) /mnt (Temporary Mount Points):
Administrators can use this directory as a temporary mount point for
mounting file systems or devices.
10) /opt (Optional Software):
The /opt directory is used for the installation of optional software
packages. It's often used for third-party or vendor-supplied software that
doesn't conform to the standard file system hierarchy.
11) /srv (Service Data):
This directory contains data files for services provided by the system.
It's used for data that the system's services serve to external clients.

12) /tmp (Temporary Files):


Temporary files and directories are stored here. These files are typically
cleared upon system reboot.
13) /usr (User Binaries and Data):
This directory contains user-level binaries, libraries, documentation,
and other data files that are not required for the system's basic operation.
It's subdivided into several subdirectories, including /usr/bin, /usr/lib,
/usr/share, and more.
14) /var (Variable Files):
The /var directory contains variable data files that change during the
system's operation, such as log files, spool files, and temporary data.
15) /run (Runtime Data):
This directory stores runtime data files and process-related information,
such as process IDs (PIDs) and sockets.

LAB NO # 02
WHAT IS Ubuntu?
Ubuntu is a Linux distribution based on Debian and composed mostly
of free and open-source software. Ubuntu is officially released in multiple
editions: Desktop, Server, and Core for Internet of things devices and
robots. All the editions can run on a computer alone, or in a virtual
machine.
Ubuntu was developed by Canonical, which belongs to a Linux family,
while Microsoft develops Windows10. Ubuntu is an open-source
operating system, while Windows is a paid and licensed operating system.
It is a very reliable operating system in comparison to Windows 10.
Ubuntu and Windows have unique advantages and disadvantages.
However, given the robust, secure, and speedy functionalities for
programming, Ubuntu is a preferred choice for developers and testers. On
the other hand, users who work with MS Office and Adobe Photoshop
prefer Windows.
Difference between Linux and Ubuntu
Linux is a free and open-source kernel that forms the foundation for
numerous operating systems, including Ubuntu. Ubuntu, on the other
hand, is a Linux distribution that provides a complete operating system
package with a user-friendly interface and a range of pre-installed
software.
Features of Ubuntu:
Ubuntu is a popular and user-friendly Linux distribution known for its
ease of use and robust features. Here are some of the key features of
Ubuntu:

1) Free and Open Source:


Ubuntu is distributed under an open-source license, which means
it's free to use, modify, and distribute. This makes it accessible to a wide
range of users and developers.
2) Regular Release Schedule:
Ubuntu follows a predictable release cycle, with new versions released
every six months. This provides users with access to the latest software
and features.
3) Long-Term Support (LTS) Releases:
In addition to regular releases, Ubuntu offers LTS versions with
extended support (usually five years). These versions are well-suited for
production environments and organizations that require stability.
4) Desktop Environment:
Ubuntu typically uses the GNOME desktop environment, known for its
simplicity and elegance. It provides an intuitive and user-friendly
interface.
5) Software Center:
Ubuntu Software Center (or GNOME Software) makes it easy to
discover, install, and manage software applications, including both open-
source and proprietary options.
6) Package Management:
Ubuntu uses the Debian package management system, allowing users
to install, update, and remove software packages using commands like apt
or through graphical package managers.

7) Security:
Ubuntu prioritizes security and provides regular updates and patches to
keep the system secure. It also includes features like the Uncomplicated
Firewall (UFW) for easy firewall configuration.
8) Community Support:
Ubuntu has a large and active user community that provides support
through forums, documentation, and online resources. You can find
answers to common issues and get help from experienced users.
9) Ubuntu Server:
Ubuntu Server is a robust server operating system widely used for web
hosting, cloud computing, and enterprise applications. It includes features
like the Landscape management tool and support for container
technologies like Docker.
10) Compatibility:
Ubuntu is compatible with a wide range of hardware, and it offers
excellent driver support, making it suitable for desktops, laptops, servers,
and even IoT devices.
11) Snap Packages:
Ubuntu introduced the Snap packaging format, which allows developers
to package and distribute software with all its dependencies, making it
easier to maintain and update applications.
12) Cloud Integration:
Ubuntu is well-suited for cloud computing and integrates seamlessly
with popular cloud platforms like Amazon Web Services (AWS),
Microsoft Azure, and Google Cloud Platform.

13) Accessibility:
Ubuntu places a strong emphasis on accessibility, with features and
tools to make the operating system usable by individuals with disabilities.
14) Localization:
Ubuntu is available in numerous languages, and its software center
offers applications in multiple languages, making it accessible to a global
audience.
15) Customization:
Users can easily customize the look and feel of Ubuntu through themes,
extensions, and various desktop environments if GNOME is not preferred.

LAB NO # 03
HOW TO DOWNLOAD AND INSTALL UBUNTU?
STEP NO 1:
For Hardware compatibility follow these steps.
1. Restart the PC.
2. When the Screen is appeared Press F2 Until the BIOS setting is
appeared.
3. Click on Virtualization Support.
4. Click on Virtualization.
5. Make sure that it is enabled.

STEP NO 2:
First you need to do Something that’s given below.
1. Open your Control Panel.
2. Click on App.
3. Go to Optional Features.
4. Click on more window Features.
5. Check on Virtual Machine Platform.
6. Check on Window Subsystem for Linux.
STEP NO 3:
There are the following Steps for Download the Ubuntu.
1. For Download the Ubuntu open the Microsoft Store.
2. Search Ubuntu.
3. Click Ubuntu 22.04.2 LTS.

STEP NO 4:
Now when it’s installed then open it and if it is show like this.

Then it, will be fine


If it shows an error, then download WSL2 for download wsl2.
1. Go to the Command Prompt.
2. Write WSL installation.
3. When it’s Complete Please restarted your Pc.

LAB NO # 04
Commands in Ubuntu Linux Command Line System:
There are Several Commands in the Ubuntu Linux that’s given Below.
1) Pwd Command:
In Ubuntu Linux, the pwd command stands for "print working
directory." When you run the pwd command in the terminal, it displays
the full path of the current directory (folder) you are in. This can be useful
when navigating the file system or when you need to know your current
location within the directory structure.
USE:
Here's how to use the pwd command:
1: Open a terminal, you can open a terminal in Ubuntu by pressing
Ctrl+Alt+T or by searching for "Terminal" in the application launcher.
2: Once you have the terminal open, you will see a command prompt.
3: To use the pwd command, simply type pwd and press Enter.
4: After running the command, you will see the full path of your current
working directory displayed in the terminal. It will typically start with a
forward slash (/), which represents the root directory, and then show the
path to your current location.

2) ls Command:
In Ubuntu Linux, the ls command is used to list the files and directories
in the current directory. It is one of the most used commands in the Linux
command-line interface (CLI). You can use various options with the ls
command to customize the way it displays information.
Use
1. List Files and Directories in the Current Directory ‘ls’. When you
run ls without any options, it displays a simple list of files and
directories in the current directory, one entry per line.
2. List Files and Directories with Details ‘ls -l’. The -l option (long
format) provides a detailed listing of files and directories. It includes
information such as file permissions, owner, group, file size,
modification date, and file/directory names.
3. List Hidden Files and Directories ‘ls -a’. The -a option (all) displays
hidden files and directories. Hidden files and directories in Linux
are those that start with a dot (e.g., .config, .bashrc). By default, ls
does not show hidden files.
4. List Files and Directories in a Specific Directory ‘ls
/path/to/directory’. You can specify a directory path as an argument
to ls to list the contents of that directory instead of the current one.
5. Sort Files by Modification Time ‘ls -lt’. The -t option sorts the files
and directories by modification time, with the most recently
modified ones appearing at the top.
3) cd(Change Directory) Command:
In Ubuntu Linux, the cd command is used to change your current
working directory within the terminal. This command allows you to
navigate the file system and move between different directories or folders.

You might also like