Skip to content
简体中文
Foundations/02 · Operating systems & LinuxBack to your exercise
All chapters
Foundations of computers and AI coding · 0232 min

Operating systems & Linux

Start with a reinstall. Find a home for your programs.

A computer is not born running Windows. Different system software can make the same hardware work in a different way. We will unpack what a reinstall changes, meet the Linux families, and rehearse an installation without touching a real disk. For your first real installation, start inside a virtual machine.

By the end, you can
Explain how an connects hardware, applications and people.
Distinguish the Linux kernel, a distribution, a desktop and an installation image.
Separate preparing a USB installer from writing a system to its destination disk.
Choose a safe route for your device and give AI clear operating boundaries.

Tap a dotted-underlined term for an explanation, then follow its link to the source section.

02.01

What does reinstalling actually replace?

Reinstalling does not replace the CPU or apply a new theme. It writes a new and its boot files to a chosen disk. The hardware may stay the same while the foundation for managing files, running applications and connecting devices changes.

Whether files survive depends on the destination, partitions and installation choices. Keeping files is not an automatic promise: a whole-disk erase normally removes partitions and data on the selected disk. An AI assurance is no substitute for a verified backup and an identified target.

You do not need to wipe your everyday computer for this chapter. Rehearse in the browser, then create a . Its new system lives in a dedicated virtual disk file, without replacing the host system or requiring a USB drive.

In a familiar situation

Install Linux on a spare Windows PC and the physical components can stay unchanged, but Windows-only applications may not run directly. Reinstalling also does not add RAM or repair a physically damaged disk.

Take this with you · A reinstall replaces an environment. Identify the destination and the data you must preserve first.

02.02

Special software between applications and hardware

An operating system is software with shared responsibilities: scheduling , allocating and isolating memory, organizing files, handling device input/output and checking permissions. Every application need not reinvent keyboard, disk and network management.

The is the central management component. help the system work with particular devices, while tools and services provide other capabilities. A graphical desktop is one interface to this environment, not the whole operating system.

A useful map is application → system interface → kernel and drivers → hardware. This is a simplified model, not a claim that every operation follows an identical route: caches, firmware and hardware acceleration also participate.

In a familiar situation

When an editor saves notes.txt, it asks the system to write a file. The system checks access, locates the destination and works with the device driver. The editor need not control the flash memory inside the drive.

Take this with you · The kernel is not the desktop. System software provides shared capabilities and access boundaries.

Test the idea yourself

Installation rehearsal: two writes, one correct boot

This fictional spare PC uses x86_64. Prepare a USB, then choose the system disk. Mistakes receive explanations without changing any real device.

Try this · Match the image, distinguish the USB from the destination disk, then remove the media and boot the installed system.
Safe rehearsal · no real disk access

Scenario: a spare x86_64 PC, a USB installer and a dedicated blank practice disk. The personal-data disk must remain unchanged. Models and capacities are fictional, not your actual devices.

  • TRAVEL-USB · 32 GBBoot media and installation images—
  • DAILY-SSD · 512 GBPersonal photos and files — never erasePersonal data unchanged
  • LAB-SSD · 64 GBDedicated blank disk for the new system—
  1. Prepare the USB installer
  2. Choose an image and boot
  3. Choose the system destination
  4. Remove media and restart
  5. Booted the installed system

Prepare the USB installer

First write: initialize a USB for Ventoy. Choose the media and confirm the scenario's backup conditions. An internal disk is not the USB target.

Notice the three devices' different jobs. Preparing USB media and installing the system need separate write confirmations.

Browser-state simulation only. It does not read disks, download images, install software or verify your real hardware, backups or Secure Boot configuration.

02.03

From batches of jobs to interactive computing

Early computers were expensive, and preparing programs, loading data and switching jobs required considerable human work. Punched cards were an input medium, not a programming language. They could hold data or programs originating in machine code, assembly or higher-level languages; not everyone was writing assembly.

Batch processing queued jobs. Resident monitors and other early system software reused loading, job sequencing and input/output handling. Memory management, resource allocation and error handling expanded across different systems over time, rather than arriving as one complete invention.

Time-sharing let people interact through terminals while sharing a machine; CTSS was demonstrated in 1961. Unix development began in 1969. The Linux kernel appeared in 1991 and combined with GNU tools and other projects to form complete systems. Linux follows Unix-like ideas; it is not a renamed copy of Unix.

In a familiar situation

First, a person had to arrange the next computation. Later, resident software could arrange the next job; eventually, multiple users could take turns using resources. Common management work became reusable software.

Take this with you · Operating systems evolved by turning repeated machine-management work into shared software.

02.04

Why learn Linux when working with AI?

Strictly speaking, names a kernel. In everyday conversation, installing Linux usually means installing a Linux distribution. It may offer a graphical desktop or run through a command line and services. No desktop does not necessarily mean it failed to boot.

Command lines, text configuration, logs and package tools make many Linux operations recordable and composable. This is a good fit for AI-assisted troubleshooting, scripting and deployment. That is a workflow observation, not a claim that Linux makes a model smarter or that any computer can run any model after installation.

Windows is Microsoft's commercial proprietary operating system. The Linux ecosystem includes both community distributions and commercial products: open source does not exclude paid support. Developers also use Windows and macOS; WSL offers a Linux environment within Windows without requiring an immediate system replacement.

Choose according to your task, hardware support, essential applications and willingness to maintain the system. Linux is worth learning for servers and automation. Keeping your current system alongside a VM can be a better fit for specialized software or games. Your operating system is not a professional identity test.

In a familiar situation

Describe a project on Windows, test a script in a Linux VM and deploy a website to a Linux server. The transferable skill is checking paths, versions, permissions and results across environments, not winning a desktop argument.

Take this with you · Linux is a useful environment for AI-assisted programming, not a requirement for every person or task.

02.05

Distribution families: packaging and maintaining a system

A combines the Linux kernel, tools, an installer and software repositories into an installable, maintainable system. Differences go beyond wallpaper: versions, defaults, release schedules and support vary. Related distributions do not necessarily accept each other's packages safely.

Debian is community maintained, with stable, testing and unstable branches. Ubuntu builds on Debian with its own release and maintenance arrangements. Linux Mint has regular Ubuntu-based editions and the directly Debian-based LMDE. Debian stable emphasizes predictable maintenance, while a supported Ubuntu LTS is a practical shared starting point for this course.

A simplified Red Hat family map is Fedora exploring newer technology, CentOS Stream developing toward future RHEL minor releases, and RHEL providing enterprise delivery and maintenance. This describes a broad flow, not a conveyor belt that every package follows through all three projects.

Watch for old CentOS Linux tutorials. Official updates have ended; the last maintained release, CentOS Linux 7, reached end of life on June 30, 2024. CentOS Stream has a different role, not simply a new version of the old CentOS Linux model. Do not choose an unsupported image for a new beginner installation.

In a familiar situation

An apt command in a tutorial does not apply to every Linux system. Debian and Ubuntu commonly use apt; Fedora-family systems commonly use dnf. Identify the distribution before copying package-management commands.

Take this with you · Check the family, version and support status. Linux is not one fixed installation package.

02.06

Arch, Gentoo and SUSE: different choices, not ranks

Arch is an independent rolling-release distribution with a relatively minimal base that users configure. Its official repositories primarily supply binary packages. It suits people willing to read documentation and maintain their configuration. Arch-based projects such as Manjaro have their own arrangements and are not interchangeable with Arch.

Gentoo emphasizes Portage, source builds and detailed customization, and follows a rolling model. It also offers official prebuilt binary packages. It is useful for exploring builds and configuration, not a requirement to compile everything by hand or a guarantee that compiled software will run faster.

SUSE Linux Enterprise is an enterprise product. openSUSE is a community distribution ecosystem: Leap uses regular releases, while Tumbleweed rolls forward. Technical connections to the enterprise products do not make them the same product under a different download name.

Regular releases have defined versions and support periods; rolling releases continuously advance software versions. Both need maintenance and can have problems. Start with a supported Ubuntu LTS compatible with your device, complete an installation and verification, then compare another distribution in a separate VM if interested.

In a familiar situation

To run your first small website, choose a supported environment with familiar documentation. To investigate build options, explore Gentoo later. Trying six systems at once is not an entry requirement for programming.

Take this with you · Your first choice reduces learning variables. Explore other maintenance models when they serve your curiosity.

02.07

Your first real installation: use a virtual machine

A VM is a software computer running inside your current system. The host supplies resources and the guest uses a newly created virtual disk. Isolation is not absolute: begin without shared folders, physical-disk passthrough or unnecessary device sharing, and keep important files and credentials outside the exercise.

First identify your hardware, CPU architecture and available resources, then check your VM software's official compatibility requirements. On Apple Silicon, UTM's Linux virtualization guide uses ARM64 images; typical 64-bit Intel/AMD PCs use amd64/x86_64. ARM64 support does not mean an arbitrary Linux image can be installed directly on Apple Silicon hardware.

Next create a Linux VM. Allocate resources using the selected distribution's current requirements while leaving headroom for the host. Create a new dedicated virtual disk, attach an official installation ISO and start it. Do not attach an existing physical disk. Older UTM examples may begin with a Server image, so the initial absence of a desktop can be expected.

Finally follow the installer for language, keyboard, account and destination. Only use a whole-disk installation after confirming that the target is this new virtual disk. Eject the virtual installation ISO before restarting into the installed system. Leave dual boot and manual partition changes outside your first exercise.

In a familiar situation

A VM called linux-practice has a dedicated disk file on the host. Erasing that virtual disk in its installer does not mean erasing the host's system disk. If the screen does not match this expectation, stop and investigate.

Take this with you · A VM does not need Ventoy. Confirm that you are installing into a new virtual disk.

02.08

ISO, architecture and verification

An represents installation media, not an ordinary application for your existing system. Use the distribution's official site to choose a supported release, desktop or server purpose, and matching architecture. amd64 also works with compatible Intel 64-bit processors; it is not AMD-only.

Follow official instructions to compare the download's SHA256 value and, where appropriate, verify the checksum file's signature and trusted key. A matching hash confirms agreement with that checksum. If both came from the same untrusted post, this alone does not establish the publisher's identity.

A VM can usually attach the ISO directly. A physical PC needs bootable media: copying an ISO onto an ordinary USB drive usually does not make it bootable. Follow the distribution's image-writing procedure, or initialize the USB with Ventoy before copying supported images.

In a familiar situation

An ARM64 image can be intact but still be wrong for a native x86_64 installation. Match the image to the target first instead of repeatedly rewriting drives whenever booting fails.

Take this with you · Check the source, support status, architecture and integrity before installation.

02.09

Ventoy: one USB drive, several installation images

prepares multi-image boot media; it is not a Linux desktop for daily work. After initialization, supported ISO files can be copied onto the USB and selected from a boot menu. Not every image and hardware combination is guaranteed to work.

For the Windows graphical route, download and extract Ventoy from its official entry point and open Ventoy2Disk. Check the device model and capacity. Initial installation formats the selected USB, so back it up and verify recovery first. Do not blindly expose all devices and select an internal drive when the USB is missing.

Copy verified ISO files onto the prepared data partition and safely eject the drive. Adding another image later normally means copying a file, not initializing the USB again. Preparing boot media and installing an operating system onto the computer are separate stages.

Secure Boot in concerns boot trust. Ventoy support depends on its version, firmware and key-enrollment details; being able to boot does not establish full verification of every image. Consult official guidance before changing security settings or enrolling keys, and prepare recovery keys for encrypted devices first.

In a familiar situation

A 32 GB Ventoy USB can hold Ubuntu and Debian images. Boot from it, select an image, then install onto the separately prepared system disk. The USB installer and the installation destination have different jobs.

Take this with you · Initializing Ventoy affects the USB. Installing the system requires a second, separate disk check.

02.10

A spare PC installation, with clear stopping points

Preparation: use only a compatible spare PC that you are allowed to reinstall and a dedicated destination. Back up important data elsewhere, test recovery, and keep recovery keys and a way to restore the original system. Follow organizational rules for managed devices. Stay with the VM route for a daily-use machine or a dual-boot requirement.

Boot: connect the USB and use the model's manual to open its one-time boot menu and choose the UEFI USB entry. If the image offers a live session, check display, keyboard and networking before installing. Do not mount or modify the original disk. Investigate image, architecture and firmware mismatches before retrying installation.

Install: choose language, keyboard and account, then check the destination model, capacity and existing partitions. A is a logical disk region; a organizes files within it. Only erase a dedicated disk you have confirmed may be cleared. Review the final write summary. Stop at unexpected BitLocker, RST or ambiguous-destination prompts and consult official instructions.

Finish: wait for completion, remove the USB when instructed and restart; for a VM, eject the ISO. Log into the installed system, check devices and networking, then use its update tool. A desktop appearing once is insufficient proof: it might be the installer's live session.

In a familiar situation

The installer lists a 512 GB SSD containing daily files and a blank 64 GB practice SSD. Capacity is only one clue: check model and purpose too. If you cannot identify them, cancel instead of asking AI to guess a device name.

Take this with you · Do not confirm a write until you can explain the destination and the recovery plan.

02.11

Prove that the installed system works

Use a small acceptance checklist: boot without the installation media, log in, check networking and necessary devices, save a practice file in your personal folder, and restart to confirm it remains. The file test together with booting without installation media is stronger evidence than a desktop screenshot.

In a terminal, run these read-only commands separately: cat /etc/os-release for the distribution, uname -m for the running architecture, and pwd for your current directory. Ask AI to explain the command and output before deciding what to do next. These checks do not require adding sudo to look professional.

If the installation menu returns, check whether the USB or ISO is still the preferred boot source before reinstalling. For missing networking, inspect the virtual adapter or physical device support. For a missing desktop, check whether you selected a Server image. Describe observations instead of calling every symptom a broken installation.

In a familiar situation

Without the USB connected, you can log in, find hello-linux.txt after a restart, and confirm the expected distribution and architecture. That is a reproducible success. Running your own program comes next.

Take this with you · Verify the boot source, system identity and persistent files rather than relying on appearances.

02.12

Let AI coach you, not choose what to erase

Give AI your device model, architecture, current system, intended distribution, installation route, data boundaries and backup status. Ask it to identify missing information and explain the affected object and expected result for each step. Never provide passwords, tokens or encryption recovery keys.

Work through explanation → read-only inspection → plan → human confirmation → small action → verification. Require explicit risks and stopping points for administrator privileges, partitioning, formatting or boot-setting changes. AI cannot inherently know which disk holds your family photographs, and device names vary between environments.

Do not run an unknown downloaded script with administrator privileges just for convenience. Inspect its origin, contents and applicable versions; prefer official documentation and system repositories. Even in a VM, do not give an assistant unnecessary access to shared folders, credentials or the host's physical disks.

In a familiar situation

Instead of 'give me one command to install Linux', ask: 'First check whether this device is suitable for a VM exercise. Do not give formatting commands. Explain one step at a time and what evidence allows me to continue.'

Take this with you · AI can improve understanding and execution. You still own the boundaries, authorization and verification.

A new situation. What do you think?

AI suggests installing Linux onto /dev/sda. You have not identified the disk or verified a backup. What should happen next?

Choose an answer before reading the explanation.

Turn your knowledge into a useful brief

Write a first Linux experience plan for your own computer: preserve the host, install in an independent VM, reboot and verify a saved file. Mark uncertain details as unknown rather than guessing models or device names.

Think first, then uncover help as needed. Later chapters expect more complete descriptions and clearer checks.

1 Start: what am I actually changing?2 Add: environment and safety boundaries3 Refine: make success observable4 One approach you can make your own
Give your curiosity another turnGo further

Bring this chapter's context to your AI. Going deeper is optional; you can keep reading without it.

Explain how shared management capabilities grew from punched cards, batches and resident monitors to time-sharing, Unix and Linux. Distinguish input media, programming languages and operating systems, and provide checkable historical sources.

One approach you can make your own
I'm learning computers and AI-assisted programming from scratch. In this chapter I learned:
Operating systems & Linux:Explain how an operating system connects hardware, applications and people.;Distinguish the Linux kernel, a distribution, a desktop and an installation image.;Separate preparing a USB installer from writing a system to its destination disk.;Choose a safe route for your device and give AI clear operating boundaries.

Explain how shared management capabilities grew from punched cards, batches and resident monitors to time-sharing, Unix and Linux. Distinguish input media, programming languages and operating systems, and provide checkable historical sources.

Check my understanding first. Explain one small question at a time with a concrete example and the limits of any analogy. Ask a scenario question, then adapt to my answer. Distinguish facts, guesses, and uncertainty; suggest hands-on ways to check. Confirm the version before giving tool-specific advice, and don't invent features or references.

Complete this chapter

Mark the sections as read and finish the required activities listed below to record completion. You can visit the next chapter at any time.

0/12 sectionsInstallation rehearsal: two writes, one correct bootAI suggests installing Linux onto /dev/sda. You have not identified the disk or verified a backup. What should happen next?

Read the original references

This is an introduction. These official resources help you check details and explore further.

Linux Mint: project and distribution foundationsManjaro: relationship with ArchUbuntu desktop installation (check current requirements and screens)Ubuntu: verify a downloaded imageUTM: Ubuntu VM example (uses Ubuntu 22.04)Ventoy: getting startedVentoy: Secure Boot support and limitationsMicrosoft: about WSLDebian release branchesUbuntu's relationship with DebianRed Hat: CentOS Linux, Stream and RHELAbout Arch LinuxGentoo: a developer on source and binary choicesopenSUSE: choosing a distributionComputer History Museum: software and language timeline

The system gives programs an environment. Next, focus on the program itself: how do we turn an idea into rules a machine can execute?