6.6 What Is Journaling?

Some file systems use a journal to record certain changes before applying them to their main on-disk structures.

If a computer loses power or crashes during an operation, the journal can help the file system recover structural consistency.

Journaling does not guarantee that every unsaved document will be restored. It is mainly a reliability mechanism for file-system metadata or supported data operations, depending on the implementation.

Good file-system recovery and good application-level data recovery are related but different problems.

6.7 File Extensions

A file extension is a portion of a file name that often indicates its format or intended use.

Examples include:

  • .txt for plain text.
  • .pdf for PDF documents.
  • .jpg and .png for common image formats.
  • .mp3 for a common audio format.
  • .mp4 for a common media container.
  • .py for Python source files.
  • .exe for a common Windows executable format.

An extension is not definitive proof of a file's contents or safety. A malicious file can be renamed to look harmless, and some formats do not depend on extensions for identification.

6.8 What Happens When You Save a File?

Consider saving a school assignment.

  1. You choose Save in your application.
  2. The application converts your content into the appropriate file representation.
  3. It requests access to the destination through the operating system or a file-related library.
  4. The operating system checks applicable permissions and handles the request.
  5. The file system updates relevant metadata and storage structures.
  6. The system and storage device manage the actual data transfer.
  7. The application reports success when its own save operation has completed according to its design.

The precise path differs depending on the application, file system, caches, storage hardware, and requested durability guarantees.

A Save button is not a substitute for backups, especially when data is important.

6.9 File Permissions

Operating systems can restrict who may read, modify, execute, or delete files.

On Unix-like systems, common permission categories include owner, group, and others, with basic read, write, and execute permission bits. More advanced mechanisms include access-control lists and other security policies.

Windows supports access-control lists and other permission mechanisms for supported file systems and resources.

Permission systems help prevent unauthorized access and accidental changes.

6.10 File Deletion

Deleting a file does not always mean that its contents are immediately and permanently erased from every part of storage.

In many file systems, deletion removes or changes references to the file and makes its storage space available for reuse.

The actual behavior varies by file system, device type, encryption status, and operating-system implementation.

Moving a file into a Recycle Bin or Trash usually allows recovery through that interface until it is emptied or the file is otherwise removed.

For sensitive information, ordinary deletion should not be assumed to provide secure erasure.

6.11 What Is Fragmentation?

Fragmentation occurs when file data is stored in separated regions rather than in a convenient continuous sequence.

On a traditional HDD, fragmentation can increase mechanical seeking for certain access patterns.

Modern SSDs have different physical characteristics and do not benefit from conventional defragmentation in the same way. Operating systems may still perform storage optimization appropriate to an SSD, such as issuing TRIM-related operations where supported.

Do not apply old HDD maintenance advice blindly to every modern storage device.

6.12 What Is a Mount Point?

On many Unix-like operating systems, a storage device or file system is made accessible by attaching it to a directory called a mount point.

For example, a removable drive might appear under /media/student/USBDrive.

Windows commonly assigns drive letters or uses supported mount-point paths.

The fundamental purpose is similar: making stored information accessible through the operating system's naming system.

6.13 Why File-System Knowledge Matters

Understanding file systems helps with:

  • Organizing school and project files.
  • Understanding storage capacity.
  • Moving files across operating systems.
  • Troubleshooting access errors.
  • Recovering from accidental deletion.
  • Choosing the correct removable-drive format.
  • Protecting sensitive information.
  • Planning backups.

Remember: A file system is the organizational structure that allows the operating system to locate, manage, protect, and store files.

Chapter 7: User Interfaces, Commands, and Everyday OS Interaction

An operating system needs a way for people to interact with it.

Some interfaces are visual and designed for pointing and clicking. Others are text-based and allow users to enter commands.

These are different ways of interacting with the system, not separate definitions of an operating system.

7.1 What Is a User Interface?

A user interface (UI) is the part of a system through which a user interacts with software.

An operating-system environment may offer:

  • A desktop.
  • Windows or application surfaces.
  • Menus.
  • Icons.
  • A taskbar or dock.
  • Notification areas.
  • Settings panels.
  • A command-line interface.
  • Accessibility features.

The operating system often provides common interface services, while applications create their own windows and controls.

7.2 Graphical User Interface

A Graphical User Interface (GUI) uses visual elements such as windows, icons, menus, buttons, and pointers.

Examples include the standard desktops of Windows, macOS, and many Linux distributions.

A GUI can make common tasks easier for beginners because it offers visible controls and immediate visual feedback.

For example, when you drag a file into another folder, the file manager presents a visual way to request a file operation.

The operation underneath still involves operating-system services and storage management.

7.3 Command-Line Interface

A Command-Line Interface (CLI) allows users to interact with a system by entering text commands.

Examples include:

  • Command Prompt on Windows.
  • PowerShell on Windows.
  • Bash and other shells on Linux.
  • The Terminal application on macOS.

A CLI may appear less friendly at first, but it supports precision, automation, scripting, remote administration, and repeatable workflows.

For example, the following command displays the current directory in many Unix-like shells:

pwd

The following command lists items in the current directory on Unix-like systems:

ls

In Windows Command Prompt, you can use:

dir

The corresponding tools and syntax vary between environments.

7.4 What Is a Shell?

A shell is a program that provides an interface for entering commands and launching other programs.

Examples include Bash, Zsh, PowerShell, and Command Prompt's command interpreter.

A shell is not the kernel. It runs as a program and relies on operating-system services.

For example, a shell interprets a command and asks the OS to run the requested program. The kernel then manages the process and its access to resources.

7.5 What Is a Terminal?

A terminal is an interface that lets a user interact with a text-based program, commonly a shell.

Modern terminal applications often provide features such as tabs, text selection, color support, and multiple sessions.

The distinction is:

  • The terminal provides the interactive text interface.
  • The shell interprets commands and coordinates with other programs.
  • The kernel manages essential system resources and privileged operations.

In everyday conversation, people sometimes use these words loosely, but understanding the difference helps when learning system administration.

7.6 Essential Beginner Commands

On Windows Command Prompt:

  • dir — lists directory contents.
  • cd — changes the current directory.
  • mkdir Practice — creates a directory named Practice.
  • cls — clears the visible console.
  • whoami — displays the current account identity on supported Windows versions.
  • ipconfig — displays network configuration information.

On Linux and macOS terminals:

  • pwd — displays the current directory.
  • ls — lists directory contents.
  • cd — changes the current directory.
  • mkdir Practice — creates a directory named Practice.
  • clear — clears the visible terminal.
  • whoami — displays the current username.
  • ip addr on Linux, or ifconfig where available, can display network-interface information.

Commands can have different options across operating systems and versions.

7.7 Absolute and Relative Paths in Commands

Suppose your project is stored in your Documents folder.

An absolute path identifies a location from the relevant root or drive context. A relative path identifies a location based on the current working directory.

If you open a terminal inside your project directory, you may be able to run:

python main.py

This works if Python is available through the command and main.py is in the current directory.

If the current directory is different, the command may fail because the file is not found.

Many command-line errors are caused by incorrect paths, missing executables, permissions, or unavailable dependencies.

7.8 What Is a Package Manager?

A package manager helps install, update, remove, and track software packages.

Examples include:

  • apt on many Debian-based Linux systems.
  • dnf on many Fedora-based systems.
  • pacman on Arch Linux.
  • Windows Package Manager, commonly invoked as winget.
  • Homebrew on macOS.
  • Package-management systems used by different Linux distributions and development environments.

Package managers can reduce the work required to locate compatible software and manage dependencies.

However, they do not all use the same package format, repository model, or trust policy.

Installing software from untrusted sources can still expose a computer to malicious code.

7.9 Environment Variables

An environment variable is a named value made available to programs in their execution environment.

Common examples include variables used to specify:

  • Program search paths.
  • Temporary directories.
  • User directories.
  • Runtime settings.
  • Application configuration.

The PATH environment variable helps the operating system or command interpreter locate executable programs when a user enters their names.

If a command works in one terminal but not another, the relevant environment configuration may differ.

7.10 Accessibility Features

Modern operating systems provide features that help people with different abilities use computers.

Examples include:

  • Screen readers.
  • Magnification.
  • High-contrast settings.
  • Captions.
  • Voice control.
  • Keyboard navigation.
  • Sticky keys.
  • Larger text and display scaling.

Accessibility is not an optional decoration. It can be essential for making technology usable by more people.

7.11 GUI or CLI: Which Is Better?

Neither is universally better.

A GUI can be ideal for visual tasks such as arranging files or adjusting display settings.

A CLI may be better for repetitive tasks, scripting, remote administration, and working with development tools.

Professional users often use both.

For example, a developer may edit code in a graphical editor, run tests in a terminal, inspect processes using system tools, and manage files through a graphical interface.

Remember: A GUI and a CLI are different ways to interact with an operating system. Learning both gives you more control over your computer.

Chapter 8: Types of Operating Systems and Major Platforms

Not every operating system is designed for the same purpose.

Some are built for personal computers, some for phones, some for servers, and others for devices that must respond within strict timing limits.

Understanding these categories helps you choose tools and understand why operating systems behave differently.

8.1 Desktop Operating Systems

Desktop operating systems support everyday work on desktop and laptop computers.

Common examples include:

  • Microsoft Windows.
  • Apple macOS.
  • Desktop Linux distributions such as Ubuntu, Fedora, Linux Mint, and others.

They typically provide:

  • Application execution.
  • File management.
  • Graphical interfaces.
  • Networking.
  • Peripheral support.
  • User accounts and permissions.
  • System configuration tools.

Their designs balance user experience, application compatibility, security, and performance.

8.2 Server Operating Systems

A server operating system is configured to support services for other computers or users.

A server may deliver:

  • Websites.
  • Databases.
  • Email services.
  • Authentication.
  • File sharing.
  • Network storage.
  • Application programming interfaces.
  • Virtual machines.

Linux distributions and Windows Server are common examples of server platforms.

However, server software can also run on desktop editions or other supported environments. A server role is determined by how a system is used, not merely by its graphical appearance.

8.3 Mobile Operating Systems

Mobile operating systems are designed around phones and tablets.

They must coordinate:

  • Touch input.
  • Cellular and Wi-Fi networking.
  • Cameras.
  • Location services.
  • Battery use.
  • Mobile applications.
  • App permissions.
  • Background execution.
  • Notifications.
  • Device sensors.

Android and iOS are leading examples.

Mobile systems often restrict application behavior more tightly than conventional desktop environments because battery efficiency, privacy, and security are especially important.

8.4 Embedded Operating Systems

An embedded system is a computer built into a larger product or machine.

Examples include systems inside:

  • Smart televisions.
  • Wi-Fi routers.
  • Home appliances.
  • Automotive equipment.
  • Industrial controllers.
  • Cameras.
  • Network devices.

Embedded operating systems may have limited memory, processing power, or storage. They are often tailored to a specific purpose.

Some embedded devices use full-featured Linux systems. Others use specialized or very small operating systems.

8.5 Real-Time Operating Systems

A Real-Time Operating System (RTOS) is designed to provide predictable responses within defined timing constraints.

In real-time computing, correctness can depend on both the result and when it is produced.

For example, a control system may need to respond to a sensor within a certain deadline.

Real-time systems are often divided into broad categories:

  • Hard real-time: Missing a critical deadline can cause system failure or unacceptable consequences.
  • Soft real-time: Missing a deadline reduces quality or usefulness, but does not necessarily mean the entire system has failed.

An RTOS is not simply a fast operating system. Its important feature is predictable timing under its supported conditions.

Commonly discussed RTOS families include FreeRTOS, Zephyr, and QNX, among others. Their capabilities and target environments differ.

8.6 Distributed Operating-System Concepts

A distributed system consists of multiple computers coordinating to accomplish tasks.

Some designs attempt to present multiple machines as a unified computing environment. Other distributed systems expose separate machines and rely on application-level coordination.

Examples of distributed computing include:

  • Cloud platforms.
  • Distributed databases.
  • Large-scale web services.
  • Cluster computing.
  • Scientific computing environments.

Not every distributed system uses a single distributed operating system. Distributed computing is a broader concept involving communication, coordination, failure handling, and shared services across multiple computers.

8.7 Network Operating Systems

The term network operating system is used in different ways.

Historically, it often referred to operating systems or software environments designed to provide network services and manage network resources.

Today, modern desktop and server operating systems commonly provide networking capabilities, including file sharing, remote access, authentication, and communication protocols.

A network operating system should not be confused with a network operating platform used to manage routers or switches, which may have specialized functions.

8.8 Open-Source and Proprietary Operating Systems

Operating systems can also be classified by their licensing and development models.

Open-source software makes source code available under a license that grants specified rights to inspect, modify, and redistribute it.

Examples of major open-source operating-system projects include the Linux kernel and FreeBSD.

Proprietary software is distributed under licenses that restrict access, modification, or redistribution in various ways.

Windows and macOS are largely proprietary operating systems, although both can include open-source components.

Open-source does not automatically mean free of charge, perfectly secure, or free of limitations. Proprietary software is not automatically insecure or inferior. The license, implementation, maintenance, and actual requirements all matter.

8.9 Understanding Windows

Windows is a broad family of Microsoft operating systems. Desktop Windows systems use the Windows NT architecture.

Windows is commonly selected when users need:

  • Compatibility with many desktop applications.
  • Broad commercial software support.
  • Gaming compatibility.
  • Familiar productivity tools.
  • Integration with Windows-specific development and business environments.

Windows also offers command-line tools, PowerShell, developer features, security controls, and support for many hardware configurations.

Its suitability depends on the particular device, edition, application needs, maintenance status, and hardware support.

8.10 Understanding Linux

Linux is the name of an open-source kernel, while complete Linux-based operating systems are commonly called Linux distributions.

A distribution combines the kernel with other components, such as:

  • System utilities.
  • Libraries.
  • A package manager.
  • A system initialization and service-management environment.
  • Optional graphical desktops.
  • Installer and configuration tools.

Examples include Ubuntu, Debian, Fedora, Arch Linux, Linux Mint, and others.

Linux is widely used in servers, cloud infrastructure, programming environments, embedded devices, and supercomputers.

For beginners, a Linux distribution can be a useful way to learn terminals, permissions, processes, networking, and software administration.

8.11 Understanding macOS

macOS is Apple's operating system for Mac computers.

It combines Apple's user environment, system frameworks, security features, and the XNU kernel with other components.

It is commonly used for software development, creative workflows, productivity, and integration with other Apple devices.

Compatibility depends on the specific Mac model, macOS version, available software, and required hardware.

8.12 Choosing an Operating System

The best choice depends on what you need to do.

Consider the following questions:

  1. Does the operating system support your computer's hardware?
  2. Can it run the applications you need?
  3. Is it maintained and receiving relevant security updates?
  4. Are you comfortable with its interface?
  5. Will you need specialized development tools?
  6. Does it support your games or devices?
  7. Can you troubleshoot it or find appropriate help?
  8. Does its licensing model fit your requirements?

Remember: Operating systems are designed for different environments. The most suitable OS is the one that meets your requirements, hardware constraints, security needs, and workflow.

Chapter 9: Security, Users, Permissions, and Protection

Operating-system security helps protect your files, applications, personal information, and hardware resources.

A computer may contain schoolwork, saved passwords, photographs, development projects, financial records, or confidential business data. Protecting this information requires more than installing a security application.

The operating system provides many of the basic mechanisms that support a secure environment.

9.1 What Is Operating-System Security?

Operating-system security refers to the mechanisms and practices used to protect an OS and its resources from unauthorized access, modification, damage, and misuse.

Security features commonly include:

  • User authentication.
  • Permission checks.
  • Process isolation.
  • Memory protection.
  • Security updates.
  • Application controls.
  • Disk encryption support.
  • Firewall integration.
  • Secure startup mechanisms.
  • Event logging and auditing.

No single feature guarantees complete security. Effective protection depends on correct configuration, ongoing maintenance, and user behavior.

9.2 User Accounts

A user account represents an identity used to access a system.

Operating systems may support multiple accounts for different people or different purposes.

Accounts can help separate:

  • Personal files.
  • Settings.
  • Application permissions.
  • Administrative privileges.
  • Access to shared resources.

For example, one person can use a standard account for everyday browsing while an authorized administrator uses separate privileges for system-level changes.

9.3 Standard Users and Administrators

A standard user typically has permission to perform everyday tasks without unrestricted access to system-wide settings.

An administrator can perform additional operations, subject to the operating system's security controls.

On Windows, User Account Control helps request approval or administrative credentials for operations that require elevated privileges.

On Linux and other Unix-like systems, administrators often use mechanisms such as sudo to run particular commands with elevated privileges.

Administrative permissions should be used carefully. Running software with more privileges than it needs increases the consequences of mistakes and malicious behavior.

9.4 The Principle of Least Privilege

The principle of least privilege means giving a user, program, or service only the permissions it needs to perform its task.

For example:

  • A calculator does not normally need access to your entire Documents folder.
  • A document viewer may need permission to read a selected file without receiving permission to modify every file on the computer.
  • A web service should not automatically run with full administrative authority.

Restricting unnecessary permissions limits the possible damage from bugs, compromised accounts, and malicious software.

9.5 Authentication and Authorization

These two terms are related but different.

Authentication answers: Who or what are you?

Examples include a password, security key, biometric check, or other supported authentication method.

Authorization answers: What are you allowed to do?

After authentication, a system still checks whether the account has permission to open a file, change settings, or perform another operation.

A person can successfully log in but still lack permission to access a particular resource.

9.6 Passwords and Multi-Factor Authentication

A strong password should be difficult to guess and should not be reused across unrelated services.

Multi-Factor Authentication (MFA) requires additional proof of identity beyond a single authentication factor.

Depending on the system, that proof may involve a security key, authenticator application, or another supported mechanism.

MFA reduces the risk of account compromise when a password is stolen, although not every authentication method provides the same degree of protection.

Never share passwords or verification codes with someone who asks for them unexpectedly.

9.7 Malware

Malware is software designed to cause harm, gain unauthorized access, steal information, disrupt operations, or perform other malicious actions.

Important categories include:

  • Virus: Malware that can attach itself to other files or programs and spread when those infected objects are executed or handled in a suitable way.
  • Worm: Malware that can spread between systems, often through network-based mechanisms.
  • Trojan: Malicious software disguised as or delivered through something that appears legitimate.
  • Ransomware: Malware that can encrypt or otherwise deny access to data and demand payment.
  • Spyware: Software designed to collect information without appropriate authorization.
  • Rootkit: A category of software intended to hide activity or maintain privileged access, depending on its design.
  • Keylogger: Software or hardware that records keystrokes, potentially capturing sensitive information.

These categories can overlap. A single malicious program may use several techniques.

9.8 How Operating Systems Help Defend Against Malware

Operating systems can reduce risk through features such as:

  • Access controls.
  • Application isolation.
  • Security updates.
  • Reputation checks.
  • Code-signing verification.
  • Built-in security scanning.
  • Firewall support.
  • Secure boot mechanisms.
  • Restrictions on privileged operations.

These defenses are valuable but cannot guarantee that every malicious program will be blocked.

Users should still avoid untrusted downloads, suspicious attachments, pirated software, and unknown scripts that request extensive permissions.

9.9 Updates and Security Patches

A security patch is a software change that fixes a security weakness or improves protection.

Operating-system updates may address:

  • Vulnerabilities.
  • Device compatibility.
  • System reliability.
  • Performance problems.
  • Security definitions.
  • Feature improvements.

Running an operating system that no longer receives relevant security updates can increase risk over time.

Before major updates, important data should be backed up. Updates should be obtained through trusted system mechanisms or verified official sources.

9.10 Encryption

Encryption transforms readable information into a protected representation that requires the appropriate key or mechanism to recover.

Operating systems may support full-disk or volume encryption, file encryption, encrypted credential storage, and other protections.

Examples include BitLocker on supported Windows editions and FileVault on macOS.

Availability and implementation depend on the operating-system version, edition, hardware, and configuration.

Encryption protects data under specific threat conditions, especially when a device or storage medium is not unlocked. It does not automatically protect every file from malware running inside an already-unlocked session.

9.11 Secure Boot

Secure Boot is a startup-security mechanism supported by compatible firmware and operating-system configurations.

It helps verify that important boot components meet the configured trust requirements before they are executed.

Secure Boot can reduce certain forms of boot-level tampering, but it does not eliminate every startup attack or guarantee that every component after startup is trustworthy.

Proper configuration and timely updates remain important.

9.12 Firewalls

A firewall applies rules to network traffic.

Operating-system firewalls can allow or block selected connections based on their configuration and supported filtering capabilities.

For example, an incoming connection to a service may be blocked unless an authorized rule permits it.

A firewall is not a complete security strategy. It does not automatically prevent every phishing attack, malicious download, or harmful action performed by a program that is already allowed to run.

9.13 Backups and Recovery

A backup is a separate copy of important information that can help recover from accidental deletion, hardware failure, ransomware, or other incidents.

A good backup plan considers:

  • Which files are important.
  • How frequently they change.
  • Where copies are stored.
  • Whether backups are protected from unauthorized access.
  • Whether recovery has been tested.

Keeping every backup permanently connected and writable from the same computer can expose all copies to the same malware or account compromise.

Important data should have independent recovery options.

9.14 Safe Computing Habits

Follow these practical rules:

  1. Keep your operating system and applications updated.
  2. Use strong, unique passwords for important accounts.
  3. Enable MFA wherever appropriate.
  4. Install software from trusted sources.
  5. Avoid running unknown scripts as administrator or root.
  6. Review permissions when an application requests sensitive access.
  7. Back up valuable files regularly.
  8. Lock your screen when leaving the computer unattended.
  9. Use caution with unexpected links and attachments.
  10. Never assume that antivirus software makes every download safe.

Remember: Operating-system security is built from layers of protection. Accounts, permissions, isolation, updates, encryption, and safe habits work together to reduce risk.

Chapter 10: Networking, the Internet, and Operating Systems

When you open a website or send a message, your device communicates with other computers.

The operating system provides many of the mechanisms that make this communication possible.

It manages network interfaces, routes information through the networking stack, supports protocols, and provides interfaces that applications use to exchange data.

10.1 What Is a Computer Network?

A computer network is a collection of connected devices that can communicate and exchange information.

Examples include:

  • A home Wi-Fi network.
  • A school computer lab.
  • An office network.
  • A data center.
  • The global internet.

Devices communicate through wired or wireless connections using agreed-upon communication rules called protocols.

10.2 Network Interface Cards

A network interface connects a computer to a network.

It may be a physical Ethernet adapter, Wi-Fi device, or virtual interface.

The operating system works with suitable drivers to configure interfaces, process network events, and expose network functionality to applications.

If the driver is missing or the hardware is disabled, the operating system may not be able to use the interface normally.

10.3 What Is an IP Address?

An Internet Protocol (IP) address identifies a network interface or endpoint within the relevant addressing context.

Two major versions are:

  • IPv4: Uses 32-bit addresses, commonly written as four decimal numbers separated by periods, such as 192.168.1.10.
  • IPv6: Uses 128-bit addresses, typically written in hexadecimal groups separated by colons.

An address such as 192.168.1.10 is an example commonly used for private IPv4 networks. It is not a real-world address associated with a particular person.

A computer may have more than one network interface and more than one IP address.

10.4 Private and Public IP Addresses

A private IP address is used within networks that follow designated private-address ranges.

A public IP address is globally routable under the relevant internet addressing arrangements, although actual reachability can still depend on network configuration and filtering.

Home routers commonly use private addresses for devices inside the home and may use Network Address Translation to allow multiple devices to share an external IPv4 address.

Not every network works in exactly the same way, and IPv6 can operate differently from many traditional IPv4 home configurations.

10.5 What Is DNS?

The Domain Name System (DNS) translates domain names into records used by networked applications, including IP addresses when appropriate.

For example, a user may enter a domain name rather than remember an IP address.

A simplified request might work like this:

  1. The browser needs to locate a domain.
  2. The system's name-resolution mechanisms check appropriate caches or ask configured DNS resolvers.
  3. The resolver obtains the required DNS information.
  4. The browser uses the result as part of establishing network communication.

Actual resolution may involve multiple DNS records, cached responses, encrypted DNS mechanisms, or other details.

10.6 What Is TCP?

Transmission Control Protocol (TCP) is a transport protocol that provides an ordered byte stream and mechanisms for reliable delivery between communicating endpoints.

TCP includes mechanisms for retransmission, flow control, and congestion control.

Applications can use TCP through operating-system networking interfaces without implementing all these mechanisms themselves.

For example, many traditional web connections have used TCP, including common HTTPS connections over HTTP/1.1 and HTTP/2.

Not every modern web connection uses TCP. HTTP/3 normally uses QUIC, which runs over UDP.

10.7 What Is UDP?

User Datagram Protocol (UDP) is a transport protocol that provides datagrams without the same built-in reliable, ordered delivery guarantees as TCP.

Applications may use UDP when their design benefits from low-overhead datagram communication or needs to implement reliability in a different way.

UDP is commonly used in areas such as:

  • Real-time audio and video.
  • Online gaming.
  • DNS communication.
  • QUIC-based transport.
  • Certain streaming and network protocols.

UDP is not inherently always faster or better than TCP. The appropriate choice depends on the application and network conditions.

10.8 What Happens When You Open a Website?

Consider entering a website address into a browser.

A simplified sequence is:

  1. The browser interprets the address.
  2. The system resolves the domain name when necessary.
  3. The browser establishes the appropriate network connection.
  4. If HTTPS is used, the client and server perform the required TLS security procedures.
  5. The browser sends an HTTP request.
  6. The server responds with content or an appropriate status.
  7. The browser processes the HTML, CSS, JavaScript, images, and other resources.
  8. The browser renders the page on the screen.

Several layers are involved in this process.

The operating system helps provide network access and process communication, while the browser implements important parts of web behavior and rendering.

10.9 Ports and Sockets

A port identifies a transport-level endpoint associated with a service on a host.

A socket is a software interface used for communication, with details varying by operating system and socket type.

For example, an HTTPS service commonly uses TCP port 443, while DNS can use UDP or TCP port 53 in common configurations. Other services may use different ports.

A port number alone does not prove that a service is safe, active, or accessible from outside the device.

10.10 What Is a VPN?

A Virtual Private Network (VPN) can create an encrypted tunnel between a device and a VPN endpoint, depending on the protocol and configuration.

A VPN may help protect certain network traffic from observation on a local network and may provide access to a private organization network.

However, a VPN does not make a device automatically anonymous or protect it from every type of attack.

The VPN provider and destination services may still have visibility into some information, and browser tracking, malware, account identity, and configuration mistakes can expose additional details.

10.11 Network Troubleshooting

When the internet is not working, check the problem systematically.

  1. Confirm that Wi-Fi or the Ethernet connection is enabled.
  2. Check whether the computer has an appropriate network address.
  3. Test whether other websites or applications can connect.
  4. Check whether the problem affects one device or several devices.
  5. Verify whether DNS resolution is working.
  6. Restart the affected application or network device when appropriate.
  7. Consult the operating system's network diagnostics.
  8. Check router settings, connection status, and service-provider outages if needed.

Avoid randomly changing DNS, firewall, proxy, or adapter settings before identifying the likely cause.

Remember: The operating system provides essential networking services, but successful internet communication also depends on applications, network protocols, routers, servers, and the surrounding infrastructure.

Chapter 11: Booting, Installing, Updating, and Recovering an Operating System

A computer does not instantly become a usable desktop the moment power is applied.

Several components work together before the operating system is ready.

This startup process is called booting.

11.1 What Is Booting?

Booting is the process of starting a computer and bringing its operating system into an operational state.

A simplified startup sequence is:

  1. The computer receives power.
  2. The processor begins executing code from a platform-defined starting location.
  3. Firmware initializes and checks essential hardware.
  4. The firmware locates an appropriate boot option.
  5. A bootloader or boot manager loads or prepares the operating-system startup environment.
  6. The kernel is loaded and initialized.
  7. The operating system discovers or configures required hardware and starts important services.
  8. A login screen or user environment becomes available.

The details differ across hardware platforms, firmware configurations, operating systems, and startup modes.

11.2 What Is BIOS?

The Basic Input/Output System (BIOS) is a traditional PC firmware interface that has historically been responsible for early initialization and the beginning of the boot process.

Older PCs commonly used BIOS-based startup and partitioning arrangements.

Firmware starts before the operating system and provides essential early functionality.

11.3 What Is UEFI?

Unified Extensible Firmware Interface (UEFI) is a modern firmware specification used by many contemporary computers.

UEFI supports firmware services, device initialization, boot applications, and other functions.

Many modern PCs use UEFI instead of the older traditional BIOS startup model, although people often use the term BIOS informally to refer to either system's setup interface.

UEFI is commonly used with GUID Partition Table (GPT) disks and can support Secure Boot.

11.4 What Is a Bootloader?

A bootloader is software that helps load or start an operating system.

Its responsibilities may include:

  • Identifying the selected operating system.
  • Loading the kernel.
  • Supplying startup parameters.
  • Preparing information needed by the OS.
  • Supporting selection among multiple installed systems.

GRUB is widely used in Linux environments. Windows systems have their own boot-management components.

A bootloader is not the operating system's entire kernel. It is part of the startup process.

11.5 What Happens During Kernel Initialization?

Once the kernel begins running, it initializes major internal components.

Depending on the operating system, these activities may include:

  • Setting up memory management.
  • Initializing scheduling mechanisms.
  • Establishing interrupt handling.
  • Discovering or initializing hardware.
  • Preparing device drivers.
  • Initializing storage and file-system support.
  • Starting early system processes or services.

The kernel may rely on an initial temporary environment, such as an initramfs on many Linux systems, to access the resources required to complete startup.

11.6 What Is a Live Operating System?

A live operating system can run from removable media or another temporary environment without requiring a conventional full installation on the computer's internal drive.

A Linux live USB, for example, can help users:

  • Try a Linux distribution.
  • Test hardware compatibility.
  • Perform certain recovery tasks.
  • Access files when another installation is damaged.
  • Evaluate a system before installing it.

Some live systems support persistent storage, while others discard many session changes after rebooting.

A live environment should still be treated carefully when accessing sensitive data or modifying disks.

11.7 What Does Installing an Operating System Involve?

Installing an OS commonly involves several tasks.

  1. Checking hardware compatibility and minimum requirements.
  2. Preparing appropriate installation media.
  3. Starting the installer.
  4. Selecting a destination disk or partition.
  5. Configuring the system's language, keyboard, and other settings.
  6. Installing the necessary system files.
  7. Configuring accounts and security options.
  8. Installing or selecting compatible drivers.
  9. Completing initial system configuration.
  10. Applying necessary updates.

The exact sequence varies.

Some installations preserve selected files or settings, while others erase the destination. Always read the installer carefully and back up important data before making disk or partition changes.

11.8 Partitions and Drives

A partition is a defined region of a storage device that can be managed separately within the relevant partitioning scheme.

For example, a computer might have one partition for an operating system and another for personal data.

This arrangement can be useful, but separate partitions on the same physical drive are not equivalent to independent backups. A failed drive may affect every partition on it.

Some operating systems and storage technologies use additional layers, such as logical volumes or encrypted volumes.

11.9 Updating an Operating System

Operating-system updates may include:

  • Security fixes.
  • Driver updates.
  • Compatibility improvements.
  • Bug fixes.
  • New features.
  • Performance changes.

A responsible update process involves checking that the update is appropriate for the system, backing up important data, using trusted update mechanisms, and allowing installation to finish correctly.

Interrupted or failed updates can sometimes require recovery tools.

11.10 Why Windows May Be Slow to Start

A slow boot can have several causes.

  • Too many startup applications.
  • A slow or failing storage device.
  • Hardware initialization delays.
  • Driver problems.
  • Background update operations.
  • File-system errors.
  • Security software performing startup checks.
  • Insufficient memory or other resource constraints.
  • A problematic external device.

You can investigate startup behavior through system diagnostic tools rather than immediately reinstalling the OS.

11.11 What Is Safe Mode?

Safe Mode is a troubleshooting startup option that loads a limited set of system components compared with normal startup.