2237689
Practical File
SUBJECT: OPERATING SYSTEMS LAB
[Link] – 4th Semester
[Batch 2021-25]
CGC College of Engineering
Landran, Mohali-140307
Submitted By;
Harsh Jindal,
(2237689);
[Link] CSE
pg. 1
2237689
EXPERIMENT – 1
AIM: Installation Process of various operating systems.
THEORY: OPERATING SYSTEM:
An operating system (OS) is a collection of software that manages computer
hardware resources and provides common services for compute programs. The
operating system is an essential component of the system software in a
computer system. Application programs usually require an operating system to
function.
EXAMPLES: Five of the most common operating systems are Microsoft
Windows, Apple macOS, Linux, Android and Apple's iOS.
How to Install Linux operating system step by step
procedure.
3 easy steps to install Linux
When you boot from a Linux install DVD or thumb drive, you're placed
into a minimal operating environment designed to run one or more useful
applications. The installer is the primary application, but because Linux
is such a flexible system, you can usually also run standard desktop
applications to get a feel for what the OS is like before you commit to
installing it.
Different Linux distributions have different installer interfaces. Here are
two examples:
Fedora Linux has a flexible installer (called Anaconda) capable of
complex system configuration.
pg. 2
2237689
Elementary OS has a simple installer designed primarily for an install on a
personal computer:
Elementary OS installer
pg. 3
2237689
1. Get an installer
The first step toward installing Linux is to download an installer. You
obtain a Linux install image from the distribution you've chosen to try.
Fedora is famous for being the first to update its software
Linux Mint provides easy options to install missing drivers
Elementary provides a beautiful desktop experience and several special,
custom-built applications
Linux installers are .iso files, which are "blueprints" for DVD media.
You can burn the .iso file to a DVD-R if you still use optical media, or
you can flash it to a USB drive (make sure it's an empty USB drive, as all
of its contents are erased when the image is flashed onto it). To flash an
image to a USB drive, you can use the open source Etcher application.
Etcher application can flash a USB thumb drive
You're now ready to install Linux.
2. Boot order
SKIP TO CONTENT
More Linux resources
pg. 4
2237689
Linux commands cheat sheet
Advanced Linux commands cheat sheet
Free online course: RHEL Technical Overview
Linux networking cheat sheet
SELinux cheat sheet
Linux common commands cheat sheet
What are Linux containers?
Our latest Linux articles
To install an OS onto a computer, you must boot to the OS installer. This
is not common behavior for a computer because it's so rarely done. In
theory, you install an OS once, and then you update it. When you opt to
install a different operating system onto a computer, you're interrupting
that normal lifecycle. That's not a bad thing. It's your computer, so you
have the authority to do re-image it. However, it's different from the
default behavior of a computer, which is to boot to whatever operating
system it finds on the hard drive immediately after being powered on.
Before installing Linux, you must back up any data you have on your
target computer because it will all be erased upon installation.
Assuming you've saved your data to an external hard drive, which you've
then secreted away to somewhere safe (and not attached to your
computer), then you're ready to proceed.
First, attach the USB drive containing your Linux installer to your
computer. Power on the computer and watch the screen for some
indication of how to interrupt its default boot sequence. This is usually a
key like F2, F8, Esc, or even Del, but it varies depending on your
motherboard manufacturer. If you miss your window of opportunity, just
wait for the default OS to load, and then reboot and try again.
When you interrupt the boot sequence, your computer prompts you for
boot instructions. Specifically, the firmware embedded into the
motherboard needs to know what drive to look to for an operating
system it can load. In this case, you want the computer to boot from the
USB drive containing the Linux image. How you're prompted for this
information varies, depending on the motherboard manufacturer.
Sometimes, it's a very direct question complete with a menu:
pg. 5
2237689
The boot device selection menu
Other times, you're taken into a rudimentary interface you can use to set
the boot order. Computers are usually set by default to look to the
internal hard drive first. Failing that, it moves on to a USB drive, a
network drive, or an optical drive. You need to tell your computer to look
for a USB drive first so that it bypasses its own internal hard drive and
instead boots the Linux image on your USB drive.
pg. 6
2237689
BIOS selection screen
This may seem daunting at first, but once you get familiar with the
interface, it's a quick and easy task. You won't have to do this once
Linux is installed because, after that, you'll want your computer to boot
off the internal hard drive again. This is a great trick to get comfortable
with, though, because it's the key to using Linux off of a thumb drive,
testing a computer for Linux compatibility before installing, and general
troubleshooting regardless of what OS is involved.
Once you've selected your USB drive as the boot device, save your
settings, let the computer reset, and boot to the Linux image.
3. Install Linux
Once you've booted into the Linux installer, it's just a matter of stepping
through prompts.
The Fedora installer, Anaconda, presents you a "menu" of all the things
you can customize prior to installation. Most are set to sensible defaults
and probably require no interaction from you, but others are marked with
alert symbols to indicate that your configurations can't safely be guessed
and so need to be set. These include the location of the hard drive you
want the OS installed onto and the user name you want to use for your
account. Until you resolve these issues, you can't proceed with the
installation.
For the hard drive location, you must know which drive you want to
erase and re-image with your Linux distribution of choice. This might be
an obvious choice on a laptop that has only one drive, to begin with:
pg. 7
2237689
Select the drive to install the OS to (there's only one drive in this example)
If you've got more than one drive in your computer, and you only want
Linux on one of them, or else you want to treat both drives as one, then
you must help the installer understand your goal. It's easiest to assign
just one drive to Linux, letting the installer perform automatic partitioning
and formatting, but there are plenty of other options for advanced users.
Your computer must have at least one user, so create a user account for
yourself. Once that's done, you can click the Done button at last and
install Linux.
pg. 8
2237689
Anaconda options are complete and you're ready to install
Other installers can be even simpler, believe it or not, so your
experience may differ from the images in this article. No matter what, the
install process is one of the easiest operating system installations
available outside of getting something pre-installed for you, so don't let
the idea of installing an OS intimidate you. This is your computer. You
can and should install an OS in which you have ownership.
pg. 9
2237689
How to Install Window operating system step by step
procedure.
Step 1 - Format the drive and set the primary partition
as active
1. Connect the USB flash drive to your technician PC.
2. Open Disk Management: Right-click on Start and
choose Disk Management.
3. Format the partition: Right-click the USB drive partition and
choose Format. Select the FAT32 file system to be able to
boot either BIOS-based or UEFI-based PCs.
Note
FAT32 has a file size limit of 4GB If your WIM image is
larger than 4 GB, see If your Windows image is larger
than 4GB below.
4. Set the partition as active: Right-click the USB drive
partition and click Mark Partition as Active.
5. Step 2 - Copy Windows Setup to the USB flash drive
1. Use File Explorer to copy and paste the entire contents of
the Windows product DVD or ISO to the USB flash drive.
2. Optional: add an united file to automate the installation
process. For more information, see Automate Windows
Setup
pg. 10
2237689
Step 3 - Install Windows to the new PC
1. Connect the USB flash drive to a new PC.
2. Turn on the PC and press the key that opens the boot-
device selection menu for the computer, such as the
Esc/F10/F12 keys. Select the option that boots the PC from
the USB flash drive.
Windows Setup starts. Follow the instructions to install
Windows.
3. Remove the USB flash drive.
pg. 11
2237689
If your Windows image is larger than 4GB
Windows USB install drives are formatted as FAT32, which has
a 4GB file size limit. If your image is larger than the file size
limit:
1. Copy everything except the Windows image file (sources\
install. Wim) to the USB drive (either drag and drop, or use
this command, where D: is the mounted ISO and E: is the
USB flash drive.)
command Copy
robocopy D: E: /s /max:3800000000
2. Split the Windows image file into smaller files, and put the
smaller files onto the USB drive:
Command Copy
pg. 12
2237689
Dims /Split-Image /ImageFile:D:\sources\
[Link] /SWMFile:E:\sources\[Link]
/FileSize:3800
Note
Windows Setup automatically installs from this file, so long
as you name it [Link].
Experiment -2
Aim: To make use of commands of command prompts.
a. System info.
Type the command line systeminfo and press Enter. Your
computer will show you all the specs for your system — just scroll
through the results to find what you need.
pg. 13
2237689
b. Vol
It is used to display the volume label and volume serial
number of a logical drive, such as a hard disk partition or a
floppy disk, if they exist.
c. Ver
In computing, ver (short for version) is a command in various
command-line interpreters (shells) such as [Link] ,
[Link] and 4DOS/4NT. It prints the name and version of the
operating system, the command shell, or in some
implementations the version of other commands.
pg. 14
2237689
d. Date and time
TIME [/T | time] When this command is called from the command
line or a batch script, it will display the time and wait for the user
to type a new time and press RETURN. Pressing RETURN
without entering a new time will keep the current system time.
date command is used to display the system date and time. date
command is also used to set date and time of the system. By
default the date command displays the date in the time zone on
which unix/linux operating system is configured.
e. Dir
Dir is a command found inside the windows command processor
([Link]) that is generally used for listing the directories and
files within the current directory.
pg. 15
2237689
f. Cd
Cd is the abbreviation or synonym for chdir. It is a command found
inside the Windows Command Processor (cmd) that allows for
change of the current working directory of a shell instance.
The CWD (Current Working Directory) is a path (of a directory)
inside the file system, where the shell is currently working.
g. Cd./../
To navigate into the root directory, use "cd /" To navigate to your home
directory, use "cd" or "cd ~" To navigate up one directory level, use
"cd .." To navigate to the previous directory (or back), use "cd -"
pg. 16
2237689
h. Mkdir
To create a remote directory, type mkdir directory at the CDFtp:
prompt, where directory is the name of the new directory. For
example, type mkdir j:\input\modified to create a remote directory
named modified on the remote directory j:\input. Note: Do not use
spaces in the new remote directory name.
i. Make a file
pg. 17
2237689
j. Rename
Click the File tab, point to the Open Command Prompt option from the
menu, and then click Open Command Prompt. Step 3: After the
Command Prompt window opens, type in ren "current_filename. ext"
"new_filename. ext" and press the Enter key.
k. Notepad filename
Open the command prompt -- press Windows-R and run Cmd,
or in Windows 8, press Windows-X and select Command
Prompt -- and type Notepad to run the program. On its own,
this command opens Notepad in the same way as if you had
loaded it through the Start menu or Start screen.
l. Copy
The copy command allows users to copy one or more files to
an alternate location. The copy command is used for complete
files, if you want to copy a directory, or multiple directories
containing files, use the robocopy or xcopy command.
pg. 18
2237689
m. Del filename
1. Open Start on Windows 10.
2. Search for Command Prompt, right-click the top result, and
select the Run as administrator option.
3. Type the following command to delete an empty folder and
press Enter:
rmdir PATH\TO\FOLDER-NAME
In the command, replace PATH\TO\FOLDER-NAME with the
folder path and the folder name you want to delete. This
example removes the “files” folder:
rmdir C:\files
4. Type the following command to delete the folder and
subfolders with contents and press Enter:
rmdir /s PATH\TO\FOLDER-NAME
This example removes the “files” folder, subfolders, and files:
pg. 19
2237689
rmdir /s C:\files
5. Type the following command to delete a folder with content
recursively without a confirmation prompt and press Enter:
rmdir /s /q PATH\TO\FOLDER-NAME
This example removes the “files” folder, subfolders, and files
without prompting for confirmation:
rmdir /s /q C:\files
Once you complete the steps, the command will delete the folders with
subfolders and files from Windows 10.
The /s option deletes the folder and its content in the above command,
but it prompts confirmation. The /q option ignores the prompt and
deletes the folder recursively.
n. Move file
To move one or more files: MOVE [/Y | /-Y] [drive:]
[path]filename1[,...] destination [drive:][path]filename1 Specifies
the location and name of the file or files you want to move.
destination Specifies the new location of the file. Destination can
consist of a drive letter and colon, a directory name, or a
combination.
pg. 20
2237689
o. Cls
In computing, CLS (for clear screen) is a command used by the
command-line interpreters [Link] and [Link] on
DOS, Digital Research FlexOS, IBM OS/2, Microsoft Windows and
ReactOS operating systems to clear the screen or console
window of commands and any output generated by them.
p. Type filename
In the Windows Command shell, type is a built in command
which displays the contents of a text file. Use the type
command to view a text file without modifying it.
pg. 21