Logo

Linux: Ubuntu Installation and Basics

16 min read
Lesson slides
1 / 17

Operating Systems I - Lesson 8

Linux: Ubuntu Installation and Basics

Install Ubuntu inside a VirtualBox virtual machine, fix the AMD-V BIOS error, and use Ubuntu as a regular desktop user.

By the end of this lesson you will be able to install Ubuntu inside a VirtualBox virtual machine, fix the AMD-V BIOS error if it appears, and use Ubuntu as a regular desktop user for software, files, and documents.

Objectives

  • Understand that the installation steps used in this lesson, although shown on Ubuntu, apply with only minor screen differences to other Linux distributions.
  • Explain what a virtual machine is and why this course installs Ubuntu inside one instead of on real hardware.
  • Install VirtualBox and create a new virtual machine with a suitable amount of RAM and a virtual hard disk.
  • Install Ubuntu Linux inside that virtual machine using the graphical installer.
  • Explain what VirtualBox Guest Additions are, install them inside Ubuntu, and recognize and fix the "AMD-V is disabled in the BIOS" startup error if it appears.
  • Use Ubuntu as a regular desktop user: install and remove software with the Software Center, manage files and folders with the Files application, and create and save documents with the built-in office applications.

Prerequisites

  • This lesson uses Ubuntu Desktop, long term support release, downloaded from the official Ubuntu website. Confirm the exact version at the start of the session, then use that same version for the ISO download and everywhere else in this lesson, because menu wording and package names shift between releases.
  • A Windows host machine with at least 4 GB of RAM (enough for decent performance from the virtual system) and at least 12 GB of free disk space.
  • A stable internet connection to download the VirtualBox installer and the Ubuntu ISO image. If the connection is slow, these files can be downloaded on another computer and copied over.
  • The exact menu path or installer file for installing Guest Additions is not fixed here, since it can differ between Ubuntu releases. Confirm the Ubuntu version first, and expect that step to be demonstrated live rather than follow one fixed procedure.

Background Concepts

Each concept below follows a definition, purpose, mechanics, and example structure, except the short note on other Linux distributions and the installation-flow diagram, which are quick references and intentionally skip that structure.

Linux Distributions Beyond Ubuntu

This lesson installs Ubuntu, but Ubuntu is only one of many Linux distributions. The installer screens shown later are specific to Ubuntu, but the same kind of steps, such as partitioning a disk (dividing it into separate storage sections), creating a user account, and choosing a keyboard layout, apply to installing almost any other Linux distribution as well; the screens simply look slightly different.

Virtual Machines and Why This Course Uses One

Definition. A virtual machine (VM) is a computer that exists only as software, running as a program inside a real, physical computer. VirtualBox is virtualization software: it lets a Windows computer install and run other operating systems, such as Ubuntu, inside virtual machines, without touching Windows itself.

Purpose. Installing Ubuntu directly onto a computer, either by erasing everything and replacing Windows or by setting up a dual boot, changes that computer permanently and requires being careful with disk partitions. Installing a Linux distribution through the Microsoft Store avoids changing the computer at all, but only provides a command-line version of Linux, without a desktop environment. A virtual machine avoids both problems: VirtualBox creates a virtual hard disk, which is really just a large file stored on the host machine's real hard disk, and Ubuntu is installed inside that file as if it were a real, separate computer, complete with its own desktop. The host machine's own Windows installation is never touched. This is exactly why this course uses a virtual machine: it lets every student practice real Linux administration and command-line work on a disposable, safe system that can be deleted and recreated at any time without risking the host machine, and it lets Windows and Ubuntu run side by side, switching between them like switching between two regular applications.

How it works. VirtualBox asks the physical computer's CPU and BIOS to provide hardware virtualization support (this is the setting behind the AMD-V error covered below). The BIOS is the firmware setup screen that configures the motherboard's hardware options before Windows even starts loading, and hardware virtualization is one of those options. AMD-V is the name this setting is given in the error text covered below. Using that support, VirtualBox gives Ubuntu what looks like its own dedicated CPU, RAM, disk, and network card, even though all of it is really carved out of the real computer's hardware and reclaimed once the virtual machine is shut down.

graph TD
    HW[Real Computer Hardware] --> WIN[Windows: installed directly on the hardware]
    WIN --> VBOX[VirtualBox: runs as a normal Windows program]
    VBOX --> VM[Virtual Machine: a large file holding a virtual CPU, RAM, and disk]
    VM --> UBU[Ubuntu: installed inside that virtual machine]

As the diagram shows, Ubuntu never talks to the real hardware directly: every arrow passes through Windows and then VirtualBox first. That indirection is exactly what lets VirtualBox carve the VM's CPU, RAM, and disk out of the real machine and reclaim them when the VM shuts down, without ever touching the Windows installation running underneath it.

Example. In this lesson, the virtual disk is a .vdi file that VirtualBox creates on the Windows file system. From inside Ubuntu, that file looks and behaves like an ordinary hard disk; from Windows, it is just one more file that can be copied, moved, or deleted like any other.

VirtualBox Guest Additions

Definition. Guest Additions are a set of drivers and system programs installed inside a guest operating system, such as the Ubuntu virtual machine set up earlier, that improve how well that guest works together with the host machine running it.

Purpose. Without Guest Additions, the guest and the host exchange nothing beyond the virtual hardware VirtualBox already provides. Installing Guest Additions is what turns them into two windows on the same desktop instead of two disconnected computers, specifically by enabling shared copy-paste and drag-and-drop between Ubuntu and Windows.

How it works. Because Guest Additions run as drivers and programs installed inside the guest itself, Ubuntu has to already be installed and running before they can be added, which is why this step comes only after Ubuntu installation is complete rather than during it. Once installed, those drivers are what let VirtualBox pass clipboard content and dragged files between the guest and the host.

Example. After installing Guest Additions and restarting the virtual machine, copying a line of text on the Windows host and pasting it inside a text editor running in the Ubuntu guest (or the reverse, copying inside Ubuntu and pasting on Windows) demonstrates the shared clipboard that Guest Additions provides.

The Installation Workflow at a Glance

Before working through the detailed steps, it helps to see the whole installation process as one sequence, since each step depends on the one before it.

flowchart TD
    A[Download and install VirtualBox] --> B[Download the Ubuntu ISO image]
    B --> C[Create a new VM: name and RAM allocation]
    C --> D[Create a virtual hard disk - VDI file]
    D --> E[Attach the ISO and start the VM]
    E --> F[Run the Ubuntu graphical installer]
    F --> G[Restart the VM into the new Ubuntu system]
    G --> H[Install VirtualBox Guest Additions]
    H --> I[Explore Ubuntu as a desktop user]

In this diagram, ISO is a single downloadable file that contains an entire installation disc's contents (the file downloaded and used to boot the installer), and VDI is VirtualBox's own virtual hard disk file format, the file created and later installed onto. Each box in the diagram corresponds to one of the tasks below, in the same top-to-bottom order shown here.

Task 1: Install VirtualBox and Create a New Virtual Machine

  1. Download the latest stable version of VirtualBox from Oracle's VirtualBox website, then double-click the downloaded installer file and follow the on-screen instructions, exactly as installing any other Windows application.
  2. Download the ISO image of the Ubuntu version named in Prerequisites (do not assume it is simply the newest Ubuntu release available) from the official Ubuntu website. An ISO file is a single file containing the entire contents of an installation disc.
  3. Open VirtualBox and click the New button.
  4. Give the virtual machine a descriptive name that identifies it as this lesson's Ubuntu system.
  5. Allocate RAM to the virtual machine: 2 GB if the host machine has 8 GB of RAM or more, or 1 GB if the host has less (down to the 4 GB minimum from Prerequisites), and more than 2 GB if the host has extra RAM to spare, always leaving enough RAM free for Windows to keep running smoothly.
  6. Create a virtual hard disk to act as Ubuntu's disk. Choose the VDI (VirtualBox Disk Image) file type.
  7. Choose either Dynamically allocated (the file grows on the host disk as Ubuntu uses more space, up to the limit chosen) or Fixed size (the full size is reserved on the host disk immediately).
  8. Set the disk size. 10 GB is the minimum VirtualBox suggests, but 15 to 20 GB is preferable so there is room for updates and installed software later.

Expected output: the VirtualBox Manager main window now lists the new virtual machine, shown as powered off, with the RAM and disk size chosen in the steps above visible in its details pane.

Task 2: Install Ubuntu Inside the Virtual Machine

  1. Select the new virtual machine in VirtualBox Manager and click Start. If VirtualBox does not automatically detect the Ubuntu ISO, click the folder icon in the start-up dialog and browse to where the ISO file was downloaded.
  2. Once the virtual machine boots from the ISO, Ubuntu's installer welcome screen appears. Click Continue through the language selection screen.
  3. On the installation type screen, select Erase disk and install Ubuntu. This step only affects the virtual disk file created in Task 1; it does not touch the host machine's real Windows installation or any of its files, because the virtual machine can only see the virtual disk that VirtualBox gave it.
  4. Click Continue to confirm and begin partitioning the virtual disk. Partitioning means dividing a disk into separate labelled sections, and here the installer does it automatically across the whole virtual disk.
  5. Follow the remaining installer screens: select your own time zone from the map, then select your keyboard layout (or leave the detected default), before reaching the user account screen in step 6.
  6. On the user account screen, enter a name, a name for the computer, a username, and a password. Choose a password that can be remembered; Ubuntu also provides a way to reset a forgotten password later, but it is simpler to just remember it.
  7. Wait for the installation to complete. This step typically takes 10 to 15 minutes, depending on the host machine's speed.
  8. When prompted, restart the virtual machine. If it appears to hang on the restart screen, close VirtualBox and reopen it, then start the virtual machine again.

Expected output: after restarting, the virtual machine boots into the Ubuntu login screen. Logging in with the username and password created in step 6 shows the Ubuntu desktop for the first time.

Task 3: Install Guest Additions and Fix the AMD-V BIOS Error

  1. With the new Ubuntu virtual machine running, install VirtualBox Guest Additions inside it (see the Guest Additions concept above for what this improves, why, and why the virtual machine needs restarting afterward for it to take effect). No single menu path or installer file for this step is fixed here, since it can differ between Ubuntu releases (see the Guest Additions note in Prerequisites); treat this as a step to be demonstrated live on the current Ubuntu release rather than a fixed numbered procedure.

  2. If the virtual machine fails to start and instead shows an error whose text includes the following lines:

    Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE).
    AMD-V is disabled in the BIOS (or by the host OS) (VERR_SVM_DISABLED).

    This means that hardware virtualization support is blocked on the host machine and has to be turned on in the BIOS before the virtual machine can start. The exact wording of this message can differ by CPU manufacturer, but every version of it points to the same setting needing to be enabled.

  3. If the error above appeared, restart the host machine now and continue through step 6 below; otherwise the virtualization setting is already on and this task is complete, so skip ahead to Task 4. As the host machine powers on, press the key the manufacturer uses to enter BIOS setup (commonly F2, F10, or F12, shown briefly on the very first boot screen).

  4. Inside the BIOS setup screens, locate the virtualization option named in the error text above (AMD-V), and enable it; its exact menu location varies by motherboard or laptop manufacturer.

  5. Save the BIOS changes and exit, letting the machine boot normally back into Windows.

  6. Start the Ubuntu virtual machine again in VirtualBox.

Expected output: in step 1, after the restart, text copied on the host can be pasted inside the guest, and a file can be dragged between the host and the guest (or vice versa). In steps 3 to 6, which only apply if the error in step 2 appeared, the virtual machine starts normally afterward, with the AMD-V error no longer appearing.

Task 4: Manage Software and Files in the Ubuntu Desktop

  1. Open the Software Center from the launcher on the left-hand side of the screen.
  2. Browse the available software categories, for example the Audio category, and confirm the list of available applications for that category is displayed (an application such as Rhythmbox may already show as installed).
  3. Choose one application to install (for example, the Music application) and click Install. Watch the installation progress bar until it completes, then click Launch to open the newly installed application.
  4. Open the Installed section of the Software Center to see every application currently on the system, and confirm it lists the application just installed alongside its Remove button.
  5. Open the Updates section of the Software Center and note any critical system updates or application updates listed there.
  6. Open the Files application from the launcher (the file manager, equivalent to File Explorer on Windows).
  7. Right-click inside a folder and choose New Folder to create a folder, then type a name for it.
  8. Right-click that same folder and choose Rename from the context menu, then type a new name.
  9. Right-click any file and choose Properties from the context menu to view its details and permissions.

Expected output: step 3 shows the chosen application launching successfully; step 4 shows it listed under Installed with a Remove option; step 5 shows the Updates section listing any critical system or application updates currently available, an empty list being a valid outcome if the system is already up to date; step 6 shows the Files application opening to a file manager window; steps 7 to 9 leave a newly created, renamed folder visible in the Files window, and a Properties dialog showing the selected file's size and permission settings.

Task 5: Create and Save Documents with the Built-in Office Applications

LibreOffice, the office suite used in this task, has a documented lineage: it was first introduced in 1985 under the name StarOffice, continued from 2002 onward as OpenOffice.org, and became a separate project under the name LibreOffice starting in 2010.

  1. Open the Word Writer application (LibreOffice Writer) from the launcher and type a short paragraph of text.
  2. Save the document using the Save menu option, choosing a location and a file name.
  3. From the File menu, choose New and confirm the dialog offers a choice of document types to create.
  4. From the File menu, choose Open, browse to the file saved in step 2, and confirm it re-opens with the same text.
  5. Use the Insert Table option to add a table to the document, then right-click the table to add extra rows and columns.
  6. Open LibreOffice Impress from the launcher (the presentation application, equivalent to Microsoft PowerPoint) and confirm the default first slide appears.
  7. Add a new slide using the Duplicate Slide option, and choose a layout for it from the layout panel on the right-hand side of the screen.
  8. Save the presentation using the Save As menu option, providing a name and a location, then close and reopen it using the Open menu option to confirm it was saved correctly.

Expected output: step 4 reopens the exact text typed in step 1; step 5 shows a table with the added rows and columns inside the document; step 6 shows Impress opening to its default first slide; step 7 shows a second slide added to the slide panel with the chosen layout applied; step 8 shows the presentation, including the extra slide added in step 7, reopening exactly as it was saved.

Summary

  • Although this lesson installs Ubuntu, the same kind of installation steps (creating a VM, partitioning a virtual disk, creating a user account) apply to installing almost any other Linux distribution, with only minor differences in the exact screens shown.
  • A virtual machine lets Ubuntu run as an isolated, disposable system inside a real computer's hardware, managed by virtualization software such as VirtualBox; this is why the course installs Ubuntu inside a VM rather than replacing or dual-booting the host machine's Windows installation.
  • Setting up that VM correctly means choosing sensible RAM and virtual disk settings before installing Ubuntu with the graphical installer, which only ever touches the virtual disk file, never the host machine's real disk.
  • Guest Additions improve the everyday usability of the VM through shared copy-paste and drag-and-drop, and a hardware virtualization setting (AMD-V, the name shown in the BIOS error text) must be enabled in the host machine's BIOS before VirtualBox can start a VM at all; the AMD-V error is exactly that setting being off.
  • Ubuntu can be used entirely with the mouse through the Software Center, the Files manager, and the built-in office applications covered in this lesson, all of them working on the same disposable virtual disk created in Task 1.