1080*80 ad

Installing Ubuntu 21.04 Desktop in VirtualBox

How to Install Ubuntu in VirtualBox: A Complete Step-by-Step Guide

Running a separate operating system on your computer can seem complex, but using a virtual machine makes it safe, easy, and completely reversible. A virtual machine (VM) acts like a separate computer within your existing Windows, macOS, or Linux system, allowing you to test new software, learn a new OS, or create an isolated development environment without any risk to your main setup.

This guide will walk you through the entire process of installing a full Ubuntu Desktop environment inside Oracle VirtualBox. While we use Ubuntu 21.04 in our examples, these steps are virtually identical for all modern Ubuntu releases, including the latest LTS (Long-Term Support) versions.

Prerequisites: What You’ll Need

Before we begin, make sure you have two essential pieces of software downloaded and ready:

  1. Oracle VM VirtualBox: The virtualization software that will host our Ubuntu system. Download the correct package for your host operating system (Windows, macOS, or Linux).
  2. Ubuntu Desktop ISO Image: This is the installation file for the operating system. You can download it directly from the official Ubuntu website. We recommend choosing an LTS version for maximum stability and support.

With both files downloaded, you’re ready to create your virtual machine.

Step 1: Create a New Virtual Machine

First, we need to define the virtual hardware for our new Ubuntu system.

  1. Open VirtualBox and click the “New” button.
  2. Name and Operating System:
    • Name: Give your VM a descriptive name, such as “Ubuntu Desktop.”
    • Type: Select “Linux.”
    • Version: Choose “Ubuntu (64-bit).” VirtualBox often does this automatically based on the name you enter.
  3. Memory Size: This is the amount of RAM your main computer will allocate to the VM. A minimum of 4 GB (4096 MB) is recommended for a smooth desktop experience. If your host computer has plenty of RAM (16 GB or more), you can safely allocate more.
  4. Hard Disk: Select “Create a virtual hard disk now” and click “Create.”
    • On the next screen, choose “VDI (VirtualBox Disk Image)” as the hard disk file type.
    • For storage type, select “Dynamically allocated.” This is the most efficient option, as the virtual hard disk file will only take up space on your actual drive as it fills up.
    • Finally, set the size of the virtual hard disk. We recommend at least 25 GB to ensure you have enough space for the OS and future applications.

After clicking “Create,” your virtual machine is defined but is still empty, like a new PC without an operating system.

Step 2: Configure VM Settings and Mount the ISO

Now, we’ll fine-tune the settings and tell the VM where to find the Ubuntu installation file.

  1. Select your new Ubuntu VM from the list in VirtualBox and click the “Settings” button.
  2. Navigate to the “System” > “Processor” tab. Allocate at least 2 CPU cores to the VM for better performance. If you have a powerful host machine, allocating 4 cores is even better.
  3. Go to the “Display” tab. Under “Screen,” increase the Video Memory to its maximum (128 MB).
  4. Next, go to the “Storage” tab. Under the “Storage Devices” list, you will see an “Empty” CD icon. Click on it.
  5. On the right side of the window, click the small CD icon next to “Optical Drive” and select “Choose a disk file…”
  6. Browse to the Ubuntu Desktop ISO file you downloaded earlier and select it. This is the virtual equivalent of inserting an installation DVD.
  7. Click “OK” to save all your settings.

Step 3: Install Ubuntu Desktop

With the configuration complete, it’s time to start the VM and install the operating system.

  1. Select your Ubuntu VM and click the green “Start” arrow.
  2. The virtual machine will boot up and load the Ubuntu installer. You will be presented with a welcome screen. Select “Install Ubuntu.”
  3. Keyboard Layout: Choose your preferred keyboard layout and click “Continue.”
  4. Updates and Other Software: For a standard installation, select “Normal installation.” It’s also a good security practice to check the box for “Download updates while installing Ubuntu” to ensure your system is patched from the start.
  5. Installation Type: This step is the most critical. You will be asked how you want to install the OS.
    • Since we are installing on a blank virtual hard disk, you can safely choose the option “Erase disk and install Ubuntu.”
    • This action is completely safe and will only affect the virtual disk we created, not your main computer’s hard drive. Click “Install Now” and confirm the changes in the pop-up window.
  6. Location and User Account: Select your geographical location to set the time zone. On the next screen, create your user account.
    • Enter your name, a computer name (hostname), a username, and a strong password.
    • Choosing “Require my password to log in” is a recommended security measure. Click “Continue.”

The installation will now proceed automatically. This may take several minutes. Once it’s finished, you’ll be prompted to restart the machine. Click “Restart Now.”

Step 4: Post-Installation Cleanup and Guest Additions

After the reboot, you’ll have a fully functional Ubuntu desktop running in a window. However, for the best experience, there is one final, crucial step: installing VirtualBox Guest Additions.

VirtualBox Guest Additions is a special software package that improves performance and enables powerful features like automatic screen resizing, a shared clipboard between your host and guest, and seamless mouse integration.

  1. With your Ubuntu VM running, go to the VirtualBox menu at the top of your screen and select “Devices” > “Insert Guest Additions CD Image…”
  2. This will mount a virtual CD inside your Ubuntu VM. You should see a pop-up asking you to run the software. Click “Run.”
  3. Enter your password when prompted to authorize the installation. A terminal window will open and show the installation progress.
  4. Once the process is complete, restart your Ubuntu VM one last time.

After the final reboot, your Ubuntu virtual machine is fully configured. You can now resize the VM window, and the Ubuntu desktop will adjust automatically. You can also copy and paste text between your host machine and the Ubuntu VM. Your secure, powerful Linux environment is ready to use.

Source: https://kifarunix.com/install-ubuntu-21-04-desktop-on-virtualbox/

900*80 ad

      1080*80 ad