0% found this document useful (0 votes)
48 views44 pages

Overview of Operating Systems

os

Uploaded by

kcanzu5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views44 pages

Overview of Operating Systems

os

Uploaded by

kcanzu5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

NRB LEVEL-4(IT) Shyam Gopal Timsina

Operating system
An operating system or OS is a software program that enables the
computer hardware to communicate and operate with the computer software.
Without a computer operating system, a computer and software programs would be
useless. When computers were first introduced, the user interacted with them using
a command line interface, which required commands. Today, almost every
computer is using a GUI (Graphical User Interface) operating system that is much
easier to use and operate.
Tip: Some people may refer to an OS as "operating software." Although this is a
valid term, it is more appropriate to refer to this software as an "operating system."
Examples of computer operating systems

Microsoft Windows 10 - PC and IBM compatible operating system. Microsoft


Windows is the most common and used operating system.
Apple macOS - Apple Mac operating system. Today, the only Apple computer
operating system is macOS.
Ubuntu Linux - A popular variant of Linux used with PC and IBM compatible
computers.
Google Android - Operating system used with Android compatible phones and
tablets.
iOS - Operating system used with the Apple iPhone and iPads.
Chromium - Google operating system used with Chromebooks.

DOS

DOS (Disk Operating System) is an operating system that runs from a hard disk
drive. The term can also refer to a particular family of disk operating systems, most
commonly MS-DOS(Microsoft Disk Operating System).

Disk operating system is also used to describe several very similar command line
disk operating systems. PC-DOS (Personal Computer Disk Operating System) was
the first widely-installed disk operating system used in personal computers running
NRB LEVEL-4(IT) Shyam Gopal Timsina

on Intel 8086 16-bit processors. It was developed for IBM by Microsoft


Corporation, which also produced its own almost identical version called MS-
DOS.

These early operating systems did not multitask, as they were only able to run one
program at a time. The command line interface, in which a user has to type in
commands, required the user to remember commands to run programs or do other
operating system tasks, making it difficult for novices to use.

DOS commands

Command and Usage Examples


ATTRIB ATTRIB -R -A -S -H <VIRUS.EXE>
Change file attributes. + adds an All these attributes will be removed
attribute, - removes it. Attributes are: from virus.exe.
A=archive; R=read only; S=system;
H=hidden.
C: C:
Go to the C: drive. Similarly A: and D:
etc.
CD CD\ takes you to the top of the
Change directory. When you change directory tree (typically to C:) .
directory, the prompt changes, showing
the path of the directory you are currently CD.. moves you one level up the
in. directory tree (i.e. up towards the root
directory).
Note, directory is the term used by DOS
for what Windows calls a folder. CD <DIRECTORYNAME> takes
you to that directory. You can use one
or more subdirectory names,
separated by \ e.g.
NRB LEVEL-4(IT) Shyam Gopal Timsina

CD WINNT\Media takes you to the


directory C:\WINNT\Media

To change to another path, type the


full path with slashes. e.g.
CD \WINDOWS\SYSTEM
CLS CLS
Clear the screen.
DEL DEL <VIRUS.EXE> deletes
Delete one or more files in the current virus.exe
directory. Can be used with the * and
the ? wildcards. DEL *.JPG will delete all files with
the extension JPG.
DEL *.* will delete ALL files in the
current directory, USE WITH DEL MY*.* will delete all files
CAUTION. beginning with MY and with any
extension.
(Note: DEL cannot be used to delete
directories. Use RD to remove a DEL MY??.* will delete files that are
directory.) 4 characters long and begin with MY
and with any extension.
DIR DIR displays all files and folders in
Displays the contents of a directory the current directory. Folders are
(folder). indicated in the list by <DIR>.
Files are usually listed by name.
Note, directory is the term used by DOS
for what Windows calls a folder. DIR /P displays the contents a page at
a time, i.e. as many as will fit in your
These switches can be combined, so DIR command line window. Press any key
/W /P will return multiple rows listing a to display the next page.
page at a time.
NRB LEVEL-4(IT) Shyam Gopal Timsina

You can use the * and the ? wildcards to DIR /W displays the files/folders in
search for a particular file. The ? multiple rows. This view gives less
character represents ONE character, and information per file.
the * character represents multiple
characters. DIR *.JPG displays all files with the
extension JPG in the current directory
DIR *.* lists all the files in a directory. and all subdirectories.

DIR MY??.* displays all files


beginning with MY, exactly 4
characters long, and with any
extension.

DIR /S lists the contents of all


subdirectories.

DIR /AH displays all hidden files.


EDIT EDIT <VIRUSLOG.TXT> opens the
Runs DOS EDIT (a simple text editor). file viruslog.txt and allows you to edit
Useful for editing batch files and viewing it.
logs. This command requires
QBASIC.EXE to be present. EDIT <NEWFILE.TXT> creates a
new file called newfile.txt and opens
it up for you to edit.
HELP HELP DIR displays information on
Displays DOS Help. For help on an the DIR command.
individual command, type HELP then the
command for which you want more
information.
MD MD <NEWDIR> creates a new
Make Directory creates a new directory directory called Newdir.
NRB LEVEL-4(IT) Shyam Gopal Timsina

below the current one. (The command


can also be written as MKDIR.)
PRINT PRINT <LOGFILE.TXT>
Prints the specified file (if the printer is
supported in DOS - many are not). Prints LOGFILE.TXT
RD RD <DIRECTORYNAME>
Remove directory. Removes a sub-
directory of the current directory. The
directory you want to remove must be
empty of all files. (The command can
also be written as RMDIR)
RENAME RENAME <OLDNAME.EXE>
Rename a file. You must use the full file <NEWNAME.EXE>
name including the suffix.
TYPE TYPE C:\README.TXT|MORE
Displays the contents of a file on the
screen. If you use this command on a file
which is not a text file, the display will
be unintelligible. Use with |MORE to
display the text on a page by page basis,
and prevent it scrolling off the screen. | is
a pipe character.

Microsoft Windows

Windows is Microsoft's flagship operating system (OS), the de facto standard for
home and business computers. The graphical user interface (GUI)-based OS was
introduced in 1985 and has been released in many versions since then, as described
below. Microsoft got its start with the partnership of Bill Gates and Paul Allen in
NRB LEVEL-4(IT) Shyam Gopal Timsina

1975. Gates and Allen co-developed Xenix (a version of Unix) and also
collaborated on a BASIC interpreter for the Altair 8800. The company was
incorporated in 1981.

History and development of Microsoft and Windows

Microsoft gained prominence in the tech field with the release of MS-DOS, a text-
based command-line-driven operating system. DOS was mostly based on a
purchased intellectual property, QDOS. GUI-based operating systems of that time
included Xerox's Alto, released in 1979, and Apple's LISA and Macintosh systems,
which came later. Die-hard fans of MS-DOS referred to such systems as WIMPs,
which stood for "windows, icons, mouse and pull-down menus (or pointers)."

However, Gates saw the potential in GUI-based systems and started a project he
called Interface Manager. Gates thought he could bring the GUI to a wider
audience at a lower cost than the $9,000 LISA. The rest of Microsoft supported
this idea, and, in a somewhat ironic move, the project team selected "Windows" as
the name of the new operating system.

Microsoft announced the impending release of Windows 1.0 in 1983. The


company used some features it licensed from Apple for portions of its interface.
Microsoft released Windows 1.0 in 1985. Apple sued Microsoft and Hewlett-
Packard for $5.5 billion in 1988 claiming it did not give the companies
authorization to use certain GUI elements. In 1992, a federal court concluded
Microsoft and Hewlett-Packard did not go beyond the 1985 agreement. Apple
appealed that decision, which was upheld in 1994.

Competitors to Windows include Apple's macOS and the open


source Linux operating system from Linus Torvalds. The free price gives Linux an
edge in availability, while macOS is known for its stability and user experience.
However, Microsoft Windows continues to maintain its dominance -- a June 2018
report from the NetMarketShare site shows Windows installed on nearly 88% of
NRB LEVEL-4(IT) Shyam Gopal Timsina

desktops and laptops -- with a steady rollout of new versions to support advances
in hardware.

Windows versions through the years

1985: Windows 1.0

Like many early versions of Microsoft's GUI operating systems, Windows 1.0 was
essentially a program that ran on top of DOS. Microsoft did not release the system
until two years after its first announcement, leading to suggestions that Windows
was vaporware. The release was a shaky start for the tech giant. Users found the
software unstable. However, the point-and-click interface made it easier for new
users to operate a computer. The user-friendly nature of Windows also drew
interest from customers who might have been intimidated by a command-line
interface. Windows 1.0 offered many of the common components found in today's
graphical user interface, such as scroll bars and "OK" buttons.

1987: Windows 2.0 and 2.11

Windows 2.0 was faster, more stable and had more GUI features in common with
the Apple LISA. The system introduced the control panel and ran the first versions
of Excel and Word. Windows 2.0 supported extended memory, and Microsoft
updated it for compatibility with Intel's 80386 processor. It was during this time
that Microsoft became the largest software vendor in the world, just as computers
were becoming more commonplace. The fact that Windows systems were user-
friendly and relatively affordable was a contributing factor to the growing PC
market.

1990: Windows 3.0

Microsoft optimized the Windows 3.0 operating system, which still ran on top of
DOS, for the 386 processor for a more responsive system. Windows 3.0 supported
NRB LEVEL-4(IT) Shyam Gopal Timsina

16 colors and included the casual games familiar to most Windows users: Solitaire,
Minesweeper and Hearts. Games that required more processing power still ran
directly on MS-DOS. Exiting to DOS gave games direct hardware access made
more system resources available that otherwise would have gone to Windows.
Microsoft offered Windows 3.1 as a paid sub-release in 1993. Windows 3.1
features included support for TrueType fonts and peer-to-peer networking.

1993: Windows NT

Windows NT's release marked the completion of a side project to build a new,
advanced OS. NT was 32-bit and had a hardware abstraction layer. DOS was
available through the command prompt, but it did not run the Windows OS.
Microsoft designed NT as a workstation OS for businesses rather than home users.
The system introduced the Start button.

1995: Windows 95

Windows 95 introduced the Windows operating system to a wider audience with a


marketing campaign that featured The Rolling Stones song "Start Me Up" to
celebrate the Start button's arrival to the masses. Windows 95 facilitated hardware
installation with its Plug and Play feature. Microsoft also unveiled 32-bit color
depth, enhanced multimedia capabilities and TCP/IP network support.

1998: Windows 98

Microsoft improved speed and Plug and Play hardware support in Windows 98.
The company also debuted USB support and the Quick Launch bar in this release.
DOS gaming began to wane as Windows gaming technology improved. The
popularity of the OS made it an attractive target for malware. Microsoft integrated
web technology into the Windows user interface and built its own
NRB LEVEL-4(IT) Shyam Gopal Timsina

web browser into the desktop. This feature was one of the defining issues in the
U.S. Justice Department's antitrust suit against Microsoft in the 1990s.

2000: Windows ME

Windows ME (Millennium Edition) was the last use of the Windows 95 codebase.
Its most notable new feature was System Restore. Many customers found this
release to be unstable, and it was acknowledged as a poor release by Steve Ballmer
and Microsoft. Some critics said ME stood for "mistake edition."

Microsoft released the professional desktop OS Windows 2000 the same year.
Microsoft based this OS on the more stable Windows NT code. Some home users
installed Windows 2000 for its greater reliability. Microsoft updated Plug and Play
support, which spurred home users to switch to this OS.

2001: Windows XP

Microsoft delivered Windows XP as the first NT-based system with a version


aimed squarely at the home user. Home users and critics rated XP highly. The
system improved Windows appearance with colorful themes and provided a more
stable platform.

Microsoft virtually ended gaming in DOS with this release. DirectX-


enabled features in 3D gaming that OpenGL had difficulties with. XP offered the
first Windows support for 64-bit computing, but it was not very well supported,
lacking drivers and applications to run.

2006: Windows Vista

Microsoft hyped Windows Vista after the company spent a lot of resources to
develop a more polished appearance. Vista had interesting visual effects but the OS
NRB LEVEL-4(IT) Shyam Gopal Timsina

was slow to start and run. The 32-bit version, in particular, didn't enable
enough RAM for the memory-hungry OS to operate properly.

Microsoft tightened licensing rights and made it more work to activate Windows.
The company also peeled back user control of the operating system's internal
workings.

Microsoft lost market share to Apple and Linux variants. Vista's flaws -- coupled
with the fact that many older computers lacked the resources to run the system --
led to many home and business users staying with XP.

2009: Windows 7

Microsoft built Windows 7 on the Vista kernel. Windows 7 picked up Vista's


visual capabilities but featured more stability. To many end users, the biggest
changes between Vista and Windows 7 were faster boot times, new user interface
and the addition of Internet Explorer 8.

With true 64-bit support and more Direct X features, Windows 7 proved to be a
popular release for Windows users.

2012: Windows 8

Microsoft released Windows 8 with a number of enhancements and debuted its


tile-based Metro user interface. Windows 8 took better advantage of multicore
processing, solid-state drives (SSD), touchscreens and other alternate input
methods. Users found the switching from the traditional desktop to the tile-based
interface awkward. Even after Microsoft's UI and other updates in 8.1, Windows 8
trailed not just Windows 7 but XP in user numbers into 2014.
NRB LEVEL-4(IT) Shyam Gopal Timsina

2015: Windows 10

Microsoft announced Windows 10 in September 2014, skipping Windows 9.


Version 10 includes the Start menu, which was absent from Windows 8. A
responsive design feature called Continuum adapts the interface depending on
whether the user works with a touchscreen or a keyboard and mouse for input.
New features like an onscreen back button simplified touch input. Microsoft
designed the OS to have a consistent interface across devices including PCs,
laptops and tablets.

UNIX

UNIX is a popular multi-user, multitasking operating system (OS) developed at


Bell Labs in the early 1970s. By operating system, we mean the suite of
programs which make the computer work. It is a stable, multi-user, multi-
tasking system for servers, desktops and laptops.

UNIX systems also have a graphical user interface (GUI) similar to Microsoft
Windows which provides an easy to use environment. However, knowledge of
UNIX is required for operations which aren't covered by a graphical program,
or for when there is no windows interface available, for example, in a telnet
session.

Linux operating system


NRB LEVEL-4(IT) Shyam Gopal Timsina

Linux is a Unix-like, open source and community-developed operating system for


computers, servers, mainframes, mobile devices and embedded devices. It is
supported on almost every major computer platform including x86, ARM
and SPARC, making it one of the most widely supported operating systems.

Linux is an operating system or a kernel which germinated as an idea in the mind


of young and bright Linus Torvalds in 1991, when he was a computer science
student. He used to work on the UNIX OS (proprietary software) and thought that
it needed improvements.

However, when his suggestions were rejected by the designers of UNIX, he


thought of launching an OS which will be receptive to changes, modifications
suggested by its users.

The installation process for a Unix operating system typically involves the
following steps:

o Preparation: Obtain the Unix installation media, whether it's a


CD/DVD, USB drive, or disk image file. Ensure your computer meets
the minimum hardware requirements for the Unix distribution you
plan to install.

o Boot from Installation Media: Insert the installation media into your
computer and restart it. You may need to change the boot order in the
BIOS/UEFI settings to prioritize booting from the installation media.
NRB LEVEL-4(IT) Shyam Gopal Timsina

➢ Start Installation: Once the computer boots from the installation media,
you'll be prompted to begin the installation process. This may involve
selecting installation options such as language, keyboard layout, and disk
partitioning.

➢ Disk Partitioning: You'll need to partition your hard drive to allocate space
for the Unix operating system. You may choose to create separate partitions
for the root filesystem (/), swap space, and possibly other filesystems.

o Filesystem Formatting: Format the partitions you created with


appropriate filesystem types. Common filesystem types for Unix-like
systems include ext4, btrfs, ZFS, and XFS.

o Installation Options: Select the packages or components you want to


install. This may include the base system, desktop environment,
development tools, server software, etc. The specific options available
depend on the Unix distribution.

o Configuration: During the installation process, you may need to


configure various settings such as network connectivity, user
accounts, timezone, and hostname.

o Grub Installation: Install the GRUB (GRand Unified Bootloader) or


other bootloader to the Master Boot Record (MBR) or EFI System
Partition (ESP) to enable booting into the Unix operating system.
NRB LEVEL-4(IT) Shyam Gopal Timsina

o Finalization: Complete the installation process and remove the


installation media from the computer. Reboot the system to start using
the newly installed Unix operating system.

o Post-Installation Setup: After installation, you may need to perform


additional setup tasks such as updating system packages, installing
drivers, configuring peripherals, and setting up user preferences.

Linux installation

Choose a Linux Distribution: Decide which Linux distribution you want to install.
Popular options include Ubuntu, Fedora, Debian, CentOS, and Linux Mint. Each
distribution has its own strengths and target audience, so choose one that best suits
your needs.

Download the ISO Image: Go to the official website of your chosen Linux
distribution and download the ISO image file for the version you want to install.
Make sure to download the appropriate version for your computer architecture
(e.g., 64-bit or 32-bit).

Create Installation Media: Use the downloaded ISO image to create a bootable
installation media. You can burn it to a DVD or create a bootable USB drive using
tools like Rufus (for Windows) or Etcher (for Windows, macOS, and Linux).
NRB LEVEL-4(IT) Shyam Gopal Timsina

Boot from Installation Media: Insert the installation media into your computer and
restart it. You may need to change the boot order in the BIOS/UEFI settings to
prioritize booting from the installation media.

Start Installation: Once your computer boots from the installation media, you'll be
presented with the option to install Linux. Follow the on-screen instructions to
begin the installation process.

Partitioning: You'll need to partition your hard drive to allocate space for the Linux
installation. Most Linux distributions provide options for automatic partitioning or
manual partitioning. If you're unsure, you can usually choose the automatic option.

File system Formatting: Format the partitions you created with appropriate
filesystem types. Common choices include ext4 for the root partition (/) and swap
space for virtual memory.

Installation Options: Select any additional components or software packages you


want to install along with the base system. This may include desktop
environments, development tools, server software, etc.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Configuration: During the installation process, you'll need to configure settings


such as language, timezone, keyboard layout, and network connectivity. You'll also
need to create a user account and set a password.

Boot Loader Installation: Install the GRUB (GRand Unified Bootloader) or another
bootloader to the Master Boot Record (MBR) or EFI System Partition (ESP) to
enable booting into Linux.

Finalization: Complete the installation process and remove the installation media
from the computer. Reboot the system to start using Linux.

Post-Installation Setup: After installation, you may need to perform additional


setup tasks such as updating system packages, installing drivers, configuring
peripherals, and setting up user preferences.

Unix Back up

To back up a Unix operating system, you can use various tools and methods.
Here's a general approach:

1. Identify Data to Backup:

System configuration files (/etc directory).

User data including home directories.

Important application data.

Database files if applicable.

Any custom configurations or scripts.


NRB LEVEL-4(IT) Shyam Gopal Timsina

2. Choose Backup Method:

File-Level Backup: Copies individual files and directories.

Image-Based Backup: Creates a snapshot of the entire disk or filesystem.

3. Select Backup Storage:

External hard drives.

Network attached storage (NAS).

Cloud storage services.

Tape drives.

4. Choose Backup Tool:

tar: Unix utility for creating tape archives, commonly used for file-level backups.

rsync: Efficient file-copying tool that can be used for incremental backups.

dd: Low-level disk copying tool for creating disk images.

dump/restore: Unix utilities specifically designed for backup and restore


operations.

5. Schedule Regular Backups:

Set up automated backups using cron jobs or other scheduling mechanisms.

Ensure backups are performed regularly to minimize data loss.

6. Encrypt Backups (Optional but Recommended):


NRB LEVEL-4(IT) Shyam Gopal Timsina

Encrypt backup files or volumes to protect sensitive data.

Data recovery in unix

1. Assess the Damage:

Determine the extent of the damage to the system.

Identify the cause of the issue, whether it's hardware failure, software corruption,
or other factors.

2. Boot into Recovery Mode:

Use a recovery disk or enter single-user mode to access the system for recovery.

Alternatively, boot from a Live CD/USB or a network recovery environment.

3. Restore from Backup:

If backups are available, follow the procedure to restore critical files, directories,
and configurations.

Depending on the backup method used, this may involve file-level restores, disk
imaging, or other techniques.

4. Repair the Bootloader:

If the system fails to boot after recovery, repair or reinstall the bootloader (e.g.,
GRUB, LILO) to restore the boot process.

Use tools specific to your Unix variant for bootloader repair.

5. Verify Restored Data:


NRB LEVEL-4(IT) Shyam Gopal Timsina

Check that all critical data and configurations are restored correctly.

Test system functionality and applications to ensure they're working as expected.

6. Update the System:

Apply any updates or patches that were released after the backup was created to
ensure the system is up-to-date and secure.

7. Document Recovery Process:

Document the recovery process, including the steps taken, any issues encountered,
and their resolutions.

Use this documentation for future reference and to improve recovery procedures.

8. Implement Preventive Measures:

Identify the root cause of the issue and take steps to prevent similar incidents in the
future.

Implement redundancy measures, backups, monitoring, and regular maintenance to


minimize the risk of system failures.

9. Monitor System Health:

Regularly monitor the health and performance of the Unix system to detect and
address any potential issues early.

10. Test Backup and Recovery Procedures:

Regularly test backup and recovery procedures to ensure they're effective and up-
to-date.

Practice disaster recovery drills to simulate real-world scenarios and validate the
system's resilience.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Linux Recovery

Recovering a Linux system involves restoring it to a functional state after


encountering issues such as system crashes, data corruption, or other failures.
Here's a general guide on how to recover a Linux system:

1. Boot into Recovery Mode:

Most Linux distributions provide a recovery mode option in the bootloader menu.
Selecting this option will boot the system into a minimal environment with
essential services enabled.

2. Access Single-User Mode:

Alternatively, you can access single-user mode, also known as rescue mode, to
troubleshoot and repair the system. This mode provides a root shell prompt for
manual intervention.

3. Use Live CD/USB:

If the system cannot boot normally or into recovery mode, booting from a Live
CD/USB allows you to access the filesystem and repair the system from an
external environment.

4. Repair the Filesystem:

Use filesystem checking tools like fsck to repair any inconsistencies or errors in the
filesystem. Run fsck on the affected partitions to fix issues.

fsck /dev/sdXY

5. Restore from Backup:


NRB LEVEL-4(IT) Shyam Gopal Timsina

If you have backups, restore critical files, directories, and configurations from
them. Depending on the backup method used, this may involve file-level restores,
disk imaging, or other techniques.

6. Repair Bootloader:

Reinstall or repair the bootloader (e.g., GRUB or LILO) if the system fails to boot
after recovery. Use tools specific to your distribution for bootloader repair.

7. Reinstall Essential Packages:

If necessary, reinstall essential system packages or dependencies that may have


been corrupted or removed.

8. Check System Logs:

Review system logs (/var/log) to identify the root cause of the issue and any error
messages that may provide clues for troubleshooting.

9. Update System:

After restoring the system, ensure it is up-to-date by applying any available


updates or patches to improve stability and security.

10. Test System Functionality:

Test system functionality and applications to ensure they're working as expected


after recovery. Verify critical services and applications to confirm proper
operation.

11. Implement Preventive Measures:

Implement preventive measures such as regular backups, system monitoring, and


maintenance to minimize the risk of future failures and streamline recovery efforts.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Linux Backup

Backing up a Linux system is essential to protect against data loss, system failures,
and other disasters. Here's a guide to performing backups in Linux:

1. Identify Data to Backup:

System configuration files (/etc directory).

User data including home directories.

Databases (MySQL, PostgreSQL, etc.).

Application data and configurations.

Any other critical files or directories.

2. Choose Backup Method:

File-Level Backup: Copies individual files and directories.

Image-Based Backup: Creates a snapshot of the entire disk or filesystem.

3. Select Backup Storage:

External hard drives.

Network attached storage (NAS).

Cloud storage services.

Tape drives.
NRB LEVEL-4(IT) Shyam Gopal Timsina

4. Choose Backup Tool:

rsync: Efficient file-copying tool that supports incremental backups.

tar: Unix utility for creating tape archives, commonly used for file-level backups.

dump/restore: Unix utilities specifically designed for backup and restore


operations.

dd: Low-level disk copying tool for creating disk images.

5. Schedule Regular Backups:

Use cron jobs or systemd timers to schedule automated backups.

Regular backups minimize data loss and ensure up-to-date copies of critical data.

6. Encrypt Backups (Optional but Recommended):

Encrypt backup files or volumes to protect sensitive data from unauthorized


access.

Backup Examples:

File-Level Backup with rsync:

rsync -avz --delete /source/directory/ /backup/destination/

Verify Backup Integrity:

Regularly verify the integrity of backups to ensure they can be restored when
needed.

Document Backup Procedures:

Document the backup process, including schedules, commands used, and locations
of backups.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Implement Redundancy Measures:

Consider implementing redundancy measures such as RAID configurations or


offsite backups for additional protection against data loss.

MS DOS

Installing MS-DOS (Microsoft Disk Operating System) typically involves booting


from a DOS installation disk and following the on-screen prompts to format the
hard drive and copy the necessary system files. Here's a general guide to installing
MS-DOS:

1. Prepare Installation Media:

Obtain an MS-DOS installation disk or create a bootable USB drive with MS-DOS
files.

2. Boot from Installation Media:

Insert the MS-DOS installation disk or USB drive into the computer.

Restart the computer and boot from the installation media. You may need to
change the boot order in the BIOS or UEFI settings.

3. Start Installation Process:

Once the system boots from the installation media, you'll be prompted to begin the
installation process.

4. Partition and Format Hard Drive:

Follow the prompts to partition and format the hard drive. You can use the fdisk
command to create partitions and the format command to format them.

fdisk
NRB LEVEL-4(IT) Shyam Gopal Timsina

format C:

5. Copy System Files:

After formatting the hard drive, MS-DOS will copy essential system files to the
disk.

6. Configure System Settings:

MS-DOS may prompt you to configure system settings such as date, time,
keyboard layout, and language during the installation process.

7. Install Additional Drivers and Utilities (Optional):

If needed, you can install additional device drivers or utilities after the basic
installation is complete.

8. Complete Installation:

Once the installation process is finished, you'll be prompted to restart the


computer.

9. Test Installation:

After rebooting, ensure that MS-DOS boots properly and that you can access the
command prompt.

10. Customize Configuration (Optional):

You can further customize the MS-DOS configuration by editing configuration


files such as CONFIG.SYS and AUTOEXEC.BAT.

11. Install Applications (Optional):

Install any additional applications or programs you need to use with MS-DOS.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Notes:

Be cautious during the installation process, as formatting the wrong drive can
result in data loss.

MS-DOS installation procedures may vary slightly depending on the version of


MS-DOS you're installing and the specific hardware configuration of your
computer.

Ensure that any hardware devices you plan to use with MS-DOS are compatible
and have appropriate drivers available.

Backup in DOS

Backing up data in MS-DOS involves a straightforward process, typically


involving copying files to another storage medium. Here's a basic guide to backing
up data in MS-DOS:

1. Identify Data to Backup:

Critical files, such as documents, spreadsheets, databases, and configuration files.

Any other important data stored on the DOS system.

2. Choose Backup Medium:

Floppy disks: Commonly used for small backups due to limited capacity.

External hard drives: Provide larger storage capacity for larger backups.

Network storage: If network capabilities are available, data can be backed up to a


network share or server.

Tape drives: Less common for personal use but offer high capacity for larger
backups.
NRB LEVEL-4(IT) Shyam Gopal Timsina

3. Copy Files:

Use the COPY command to copy files and directories from the source to the
backup medium.

COPY C:\SOURCE\*.* A:\

This command copies all files from the source directory on drive C to a floppy disk
in drive A.

4. Organize Backup:

Organize backup files logically to ensure easy retrieval when needed.

Label backup media with the date and contents for easy identification.

5. Schedule Regular Backups:

Establish a backup schedule to ensure data is backed up regularly.

For critical data, daily or weekly backups may be necessary.

6. Test Backups:

Periodically verify the integrity of backups by restoring files from the backup
medium.

Ensure that backed-up files are accessible and can be successfully restored.

Recovering data in MS-DOS

1. Identify the Cause of Data Loss:

Determine the reason for data loss, whether it's accidental deletion, disk corruption,
or another issue.
NRB LEVEL-4(IT) Shyam Gopal Timsina

2. Check Backup Availability:

If backups are available, proceed with restoring files from the backup copies.

3. Restore from Backup:

Use the COPY command to copy files from the backup medium to the original
location on the disk.

COPY A:\BACKUP\*.* C:\

Replace A:\BACKUP\*.* with the path to the backup files and C:\ with the
destination directory on the disk.

4. Use Disk Recovery Tools:

If the data loss is due to disk errors or corruption, consider using disk recovery
tools specifically designed for MS-DOS.

Tools like Norton Disk Doctor or CHKDSK (Check Disk) can be used to scan and
repair disk errors.

dos

CHKDSK C: /F

5. Perform Data Recovery:

If files are deleted or lost due to accidental deletion, use data recovery software
capable of recovering files from formatted or corrupted disks.

These tools typically scan the disk for lost files and allow you to recover them to a
different location.

6. Document Recovery Process:

Document the recovery process, including the steps taken and any issues
encountered.
NRB LEVEL-4(IT) Shyam Gopal Timsina

This documentation can be useful for future reference and improving recovery
procedures.

7. Implement Preventive Measures:

After recovering the data, implement preventive measures such as regular backups,
disk maintenance, and data integrity checks to minimize the risk of future data loss.

File Systems in Operating System

A computer file is defined as a medium used for saving and managing data in the
computer system. The data stored in the computer system is completely in digital
format, although there can be various types of files that help us to store the data.

What is a File System?

A file system is a method an operating system uses to store, organize, and manage
files and directories on a storage device. Some common types of file systems
include:

FAT (File Allocation Table): An older file system used by older versions of
Windows and other operating systems.

NTFS (New Technology File System): A modern file system used by Windows. It
supports features such as file and folder permissions, compression, and encryption.

ext (Extended File System): A file system commonly used on Linux and Unix-
based operating systems.

HFS (Hierarchical File System): A file system used by macOS.

APFS (Apple File System): A new file system introduced by Apple for their Macs
and iOS devices.

A file is a collection of related information that is recorded on secondary storage.


Or file is a collection of logically related entities. From the user’s perspective, a
file is the smallest allotment of logical secondary storage.
NRB LEVEL-4(IT) Shyam Gopal Timsina

The name of the file is divided into two parts as shown below:

name

extension, separated by a period.

Issues Handled By File System

We’ve seen a variety of data structures where the file could be kept. The file
system’s job is to keep the files organized in the best way possible.
A free space is created on the hard drive whenever a file is deleted from it. To
reallocate them to other files, many of these spaces may need to be recovered.
Choosing where to store the files on the hard disc is the main issue with files one
block may or may not be used to store a file. It may be kept in the disk’s non-
contiguous blocks. We must keep track of all the blocks where the files are
partially located.

File Directories

The collection of files is a file directory. The directory contains information about
the files, including attributes, location, and ownership. Much of this information,
especially that is concerned with storage, is managed by the operating system. The
directory is itself a file, accessible by various file management routines.

The operation performed on the directory are:

• Search for a file


NRB LEVEL-4(IT) Shyam Gopal Timsina

• Create a file

• Delete a file

• List a directory

• Rename a file

• Traverse the file system

Advantages of Maintaining Directories

• Efficiency: A file can be located more quickly.

• Naming: It becomes convenient for users as two users can have same name
for different files or may have different name for same file.

• Grouping: Logical grouping of files can be done by properties e.g. all java
programs, all games etc.

Single-Level Directory

In this, a single directory is maintained for all the users.

• Naming problem: Users cannot have the same name for two files.

• Grouping problem: Users cannot group files according to their needs.

Single-Level Directory

In this, a single directory is maintained for all the users.

Naming problem: Users cannot have the same name for two files.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Grouping problem: Users cannot group files according to their needs.

Two-Level Directory

In this separate directories for each user is maintained.

Path name: Due to two levels there is a path name for every file to locate that file.

Now, we can have the same file name for different users.

Searching is efficient in this method.

Tree-Structured Directory

The directory is maintained in the form of a tree. Searching is efficient and also
there is grouping capability. We have absolute or relative path name for a file.

File Allocation Methods

There are several types of file allocation methods. These are mentioned below.

➢ Continuous Allocation
➢ Linked Allocation(Non-contiguous allocation)
➢ Indexed Allocation

Continuous Allocation

A single continuous set of blocks is allocated to a file at the time of file creation.
Thus, this is a pre-allocation strategy, using variable size portions. The file
allocation table needs just a single entry for each file, showing the starting block
NRB LEVEL-4(IT) Shyam Gopal Timsina

and the length of the file. This method is best from the point of view of the
individual sequential file. Multiple blocks can be read in at a time to improve I/O
performance for sequential processing. It is also easy to retrieve a single block. For
example, if a file starts at block b, and the ith block of the file is wanted, its
location on secondary storage is simply b+i-1.

Disadvantages of Continuous Allocation

External fragmentation will occur, making it difficult to find contiguous blocks of


space of sufficient length. A compaction algorithm will be necessary to free up
additional space on the disk.

Also, with pre-allocation, it is necessary to declare the size of the file at the time of
creation.

Linked Allocation (Non-Contiguous Allocation)

Allocation is on an individual block basis. Each block contains a pointer to the next
block in the chain. Again the file table needs just a single entry for each file,
showing the starting block and the length of the file. Although pre-allocation is
possible, it is more common simply to allocate blocks as needed. Any free block
can be added to the chain. The blocks need not be continuous. An increase in file
size is always possible if a free disk block is available. There is no external
fragmentation because only one block at a time is needed but there can be internal
fragmentation but it exists only in the last disk block of the file.

Disadvantage Linked Allocation(Non-contiguous allocation)

Internal fragmentation exists in the last disk block of the file.


NRB LEVEL-4(IT) Shyam Gopal Timsina

There is an overhead of maintaining the pointer in every disk block.

If the pointer of any disk block is lost, the file will be truncated.

It supports only the sequential access of files.

Indexed Allocation

It addresses many of the problems of contiguous and chained allocation. In this


case, the file allocation table contains a separate one-level index for each file: The
index has one entry for each block allocated to the file. The allocation may be on
the basis of fixed-size blocks or variable-sized blocks. Allocation by blocks
eliminates external fragmentation, whereas allocation by variable-size blocks
improves locality. This allocation technique supports both sequential and direct
access to the file and thus is the most popular form of file allocation.

MS-DOS Operating System

MS-DOS Operating System also called the Disk Operating system was Developed
by Microsoft for x86 personal computers. It works on the phenomenon of doing
less and getting more. It is a 16-bit operating system. A closed-source model was
initially released on August 12, 1981, and the final release on September 14, 2000.

Features of MS-DOS Operating System

It is a minimalist OS which means it can boot a computer and run programs.

Still usable for simple tasks like word processing and playing games.
NRB LEVEL-4(IT) Shyam Gopal Timsina

The mouse cannot be used to give inputs instead it uses basic system commands to
perform the task.

It is a 16-bit, free operating system.

It is a single-user operating system.

It is very lightweight due to fewer features available and no multitasking.

Limitations of MS DOS Operating System

It is not a multitasking operating system that is we cannot run too many


applications in the background.

Files on the system can be easily deleted or the system can also be easily
destroyed.

It does not provide any warning message before you delete or perform any
unwanted task like in windows or Linux.

It is text-based and it does not have any graphical user interface.

Not secure to be used in any kind of public network.

Encryption is not supported.

Difficulty in memory access.

Mouse cannot be used to give inputs.

Types of MS-DOS Commands

There are mainly two types of MS-DOS commands:


NRB LEVEL-4(IT) Shyam Gopal Timsina

1. Internal Commands

Internal commands are those commands that are loaded automatically in the
memory when DOS is loaded into memory during the booting process. These
commands are easier to learn and use. They require no external files for their
storage as in the case of external commands. These are for performing a basic
operation on files and in directories. They do not need any external file support.
These commands are used for common jobs such as copying and erasing files.

2. External Commands

These external commands are for performing advanced tasks and they do not need
some external file support as they are not stored in COMMAND.com. The external
commands are used less frequently and are stored in some external files which are
stored in some secondary storage devices. Whenever an external command is to be
executed then the external file in which that particular command is stored is
transferred from the secondary storage disk to the main memory(RAM).

MS-DOS File and Filetypes

A computer file created by an application running under the DOS operating


system. is called an MS-DOS file. There are three main files of DOS. During the
Booting process, the computer loads the operating system into its memory. DOS
booting involves reading the following files into memory namely

IO. SYS: A hidden executable binary file that processes instructions that tell the
operating system (OS) how the computer is set up when it is booted or started. It
contains the default MS-DOS device drivers (hardware interfacing routines) and
the DOS initialization program.

MSDOS. SYS: The MSDOS.SYS file is a hidden, system, read-only file created on
the root of the boot drive. There are several configurations that can be changed
using this file. Most values in the MSDOS.SYS are either 0 or 1, which is off or
on.
NRB LEVEL-4(IT) Shyam Gopal Timsina

COMMAND.COM: COMMAND.COM is the default command-line interpreter


for MS-DOS. It is the default user interface as well.COMMAND.COM is the
command shell on MS-DOS and PC-DOS, as well as versions of Windows that
depend on DOS. Gives users a command line interface to DOS as well as a way to
run scripts called “batch files” with the .BAT file extension.

Common operating system

There are various types of Operating Systems used throughout the world and this
depends mainly on the type of operations performed. These Operating Systems are
manufactured by large multinational companies like Microsoft, Apple, etc. Let’s
look at the few most commonly used OS in the real world:

➢ Windows
➢ UNIX
➢ LINUX

Windows

Generally referred to as Microsoft Windows, these OS are manufactured and


developed by the tech-giant Microsoft and are the most commonly used OS for
personal computers and to some extent in mobile phones or the Windows phone.

Microsoft Windows is a collection of many graphics-oriented operating systems,


first developed and launched in 1985 by the name Windows 1.0. When it started it
had the aim to provide a graphical shell to the then-famous MS-DOS which had a
character user interface, but it didn’t gain much popularity then. Slowly with the
implementation of innovative features, the OS gained popularity and soon
dominated the market of the Computer Industry, owing to its freedom of use and
user-friendly environment. Let’s look at the advantages and disadvantages of using
Microsoft Windows.

Advantages of Windows
NRB LEVEL-4(IT) Shyam Gopal Timsina

Hardware compatibility: Almost every computer hardware manufacturing industry


supports Microsoft Windows. This makes the users buy any random computer
manufacturing brand and get the latest version of pre-loaded Microsoft Windows
11 in it.

Pre-loaded and available Software: Windows comes with much more user-friendly
software to make everyday task easier and if the software is not available then one
can easily get it from the Internet and run it.

Ease of Use: Microsoft Windows has developed by far the most user-friendly OS
in the market, keeping in mind that it serves the purpose of most types of markets
in the world. It’s the most preferred OS for personal computers.

Game Runner: Windows supports a plethora of games manufactured till date and
comes with all the supporting base software to drive the game engine. So it’s the
most popular OS among the game lovers.

Disadvantages of Windows

Expensive: Microsoft is a closed-source OS and the license cost is really high. It’s
not possible for every class of society to buy a new license every time one is
expired.

Poor Security: Windows is much more prone to viruses and malware in


comparison to other OS like Linux or Mac in the market (microsoft defender
antivirus is also introduced in the nwe version).

Not reliable: Windows starts to lag with time and eventually needs booting every
time and now to get back the initial speed.

UNIX

Developed in 1970 in the Bell Lab research center UNIX became a multitasking
and multiuser operating system, reaching numerous platforms for use. It was
NRB LEVEL-4(IT) Shyam Gopal Timsina

developed by Ken Thompson, Dennis Ritchie, and a few others and later AT&T
licensed UNIX to the development of many variants of Unix, serving academic and
business purposes at the University of California, Berkley Software Distribution,
IBM, Microsoft, and Sun Microsystem.

The OS is totally written in C language allowing it to serve in various platforms. It


provides a set of simple and dedicated tools to perform a well-defined task using
basic functions, shell scripting, and command languages. As of 2014, the Unix
version with the largest installed base is Apple’s macOS

Some of the key features of UNIX include:

Multiuser support: UNIX allows multiple users to simultaneously access the same
system and share resources.

Multitasking: UNIX is capable of running multiple processes at the same time.

Shell scripting: UNIX provides a powerful scripting language that allows users to
automate tasks.

Security: UNIX has a robust security model that includes file permissions, user
accounts, and network security features.

Portability: UNIX can run on a wide variety of hardware platforms, from small
embedded systems to large mainframe computers.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Layer-1: Hardware: It consists of all hardware related information.

Layer-2: Kernel: It interacts with hardware and most of the tasks like memory
management, task scheduling, and management are done by the kernel.

Layer-3: Shell commands: Shell is the utility that processes your requests. When
you type in a command at the terminal, the shell interprets the command and calls
the program that you want. There are various commands like cp, mv, cat, grep, id,
wc, nroff, a.out and more.

Layer-4: Application Layer: It is the outermost layer that executes the given
external applications.
NRB LEVEL-4(IT) Shyam Gopal Timsina

Different version of Unix are AIS, HP-UX, BSD, Iris, etc.

Advantages of UNIX

The OS is available on a wide variety of machines that are the most truly portable
operating system.

It has a Very efficient virtual memory system, which allows many programs to run
simultaneously with a modest amount of physical memory and time.

The OS was primarily built to serve the complete multitasking purpose without
crashing of data, and it served well along with the protected memory.

Has a high-level authentication system along with a fully secured environment.

Disadvantages of UNIX

This OS was primarily designed for programmers and techies and not for personal
and casual use.

It is a command-driven OS with commands being supplied by the shell kernel and


often has cryptic names which normal users find difficult to keep up with.

To work comfortably with the UNIX system, one needs to understand the main
design features and how to command and interact with the OS.

Linux

Primarily derived from the concept of Unix, Linux became the most-prominent
free and open-source OS available to everyone in the world. It is built around the
Linux kernel and served for both desktop and server use. Linux was originally
NRB LEVEL-4(IT) Shyam Gopal Timsina

developed for personal computers based on the Intel x86 architecture but since
then it was ported to more platforms than any other operating system.

Linux has the largest installed base of all general-purpose operating systems. It is
also the leading operating system on servers and other big iron systems such as
mainframe computers, and the only OS used on TOP500 Supercomputers. The top
Linux OS are Ubuntu, Fedora, OpenSUSE, RedHat, and many more.

Linux Distribution

Linux distribution is an operating system that is made up of a collection of


software based on Linux kernel or you can say distribution contains the Linux
kernel and supporting libraries and software. And you can get Linux based
NRB LEVEL-4(IT) Shyam Gopal Timsina

operating system by downloading one of the Linux distributions and these


distributions are available for different types of devices like embedded devices,
personal computers, etc. Around 600 + Linux Distributions are available and some
of the popular Linux distributions are:

➢ MX Linux
➢ Manjaro
➢ Linux Mint
➢ elementary
➢ Ubuntu
➢ Debian
➢ Solus
➢ Fedora
➢ openSUSE
➢ Deepin

Advantages of LINUX

The OS is open-source and available free of cost to every computer user. There are
large repositories from which anyone can freely download high-quality software
for almost any task.

Linux provides high performance for a longer time and does not require a periodic
reboot to maintain the system.

It is one of the most secure OS and does not permit any unwanted malware and
virus into the system.

It is designed to multitask and can perform multiple processes at the same time,
without hampering the performance of the OS.

The OS is highly compatible and flexible to run on all modern PCs and networks.

Disadvantages of LINUX
NRB LEVEL-4(IT) Shyam Gopal Timsina

It is not as user-friendly as Windows and users need to struggle for a few days
before adapting to the behavior of OS.

It is not meant for gamers since it does not support any high graphics game.

Since there are no standard editions available for Linux, it comes with many
versions, confusing the users about what to adapt and what not.

You might also like