DEV Community

Cover image for Stepping into Ubuntu Linux: A VirtualBox Installation Guide.
 Pascal Attama
Pascal Attama

Posted on

Stepping into Ubuntu Linux: A VirtualBox Installation Guide.

INTRODUCTION

Have you ever felt curious about Ubuntu Linux and wanted to try it out? Perhaps you’re a developer wishing to test software or a student yearning to explore its vast capabilities but, at the same time, worried about tampering with your main system. VirtualBox offers a fantastic solution!

Whatever your reason, VirtualBox offers a fantastic platform to experience Ubuntu in a safe and isolated environment.
This guide will walk you through the installation process, transforming your computer into a virtual playground for exploring the wonders of Ubuntu.

Are you ready to embark on this adventure? Alright, follow the steps below; let’s rock& roll...🤝

(1). PREPARATION:

However, some prerequisites must be completed before we can begin the installation procedures on the Ubuntu Linux machine running in VirtualBox. These consist of:

First, we must find the VirtualBox software, ensure its compatibility with your system, and download it from its website: Download VirtualBox, and then install it with the right settings. This is a straightforward process.
Also, we need to obtain and download the desired Ubuntu ISO file from the official website: Ubuntu ISO file and choose a 64-bit version for optimal performance.
Have you finished downloading the two essential pieces of software mentioned above?
Then stay tuned for the next level. 😉

Below is a well-detailed explanation with pictorial illustrations and a step-by-step guide on the Ubuntu Linux installation and setup.

(2). CREATING THE VIRTUAL MACHINE:

Now, to begin your setup, these are the steps to follow:

(2.1). Launch the newly installed VirtualBox application on your computer and click the “New” button on the homepage to create a new machine.

VirtualBox Homepage

(2.2). Provide a name for your virtual machine. A best practice is using the OS name and version for uniqueness and simplicity. (e.g., “Ubuntu-22.04”)

(2.3). Select “Linux” as the type and choose “Ubuntu (64-bit)” or the appropriate version you downloaded as the version.

Name and OS settings

(2.4). Assign a memory size of 2048MB (2 GB) for your RAM to allocate a memory size.

By default, it will assign you a memory size of 1024MB (1 GB), but a good starting point for RAM allocation is 2048MB (2 GB), which can also be adjusted based on your system's available memory and the desired performance of the virtual machine. The memory can be allocated using the slider or by entering a value in the memory field.

Memory size allocation

(2.5). Select “Create a virtual hard disk now” and click the ‘create’ button to create a Virtual Hard Disk.

Virtual HardDisk creation

(2.6). Keep the default option “VDI (VirtualBox Disk Image)” selected and click the ‘next’ button.

Hard disk file type selection

(2.7). Choose “dynamically allocated” for the disk storage type. This will allow the virtual disk to grow as needed, and click the ‘next’ button.

Physical hard disk storage type selection

(2.8). Set the desired location and size for the virtual disk, and click the ‘create’ button. A minimum of 20 GB is recommended, but you can allocate more depending on your needs.

File location and size

The above steps will add a brand new Ubuntu machine to your VirtualBox machine.

Newly created Ubuntu Virtual HardDisk

(3). INSTALLING UBUNTU

After creating the virtual hard disk, we will have to install and set up Ubuntu ISO files on the newly created machine.

To attach the Ubuntu ISO:

(3.1). On the virtual machine homepage, navigate to the storage section and click the empty (optical drive) controller icon under “IDE secondary device.”.

(3.2). Select “Choose virtual disk file...” from the drop-down menu, locate and select the Ubuntu ISO file downloaded earlier, and load it into the IDE device.

Attaching the ISO file

To start and install the virtual machine:

(3.3). Select your newly created virtual machine on the VirtualBox homepage and click the “Start” button.

(3.4). Click on the first option, “Try or install Ubuntu,” and wait for a while for the booting process to activate.

Starting the machine

(3.5). Select your language.

(3.6). Choose “Try Ubuntu” or “Install Ubuntu,” depending on your preference, and select your keyboard language and layout.

Installing ubuntu

(3.7). Choose the installation type (normal installation is recommended), tick ‘Download updates while installing Ubuntu’ and click continue.

Installation type

(3.8). Choose “Erase disk and install Ubuntu.” and click the “Install Now” button.

Installation type

N/B: The message on this page appears because you’re setting up a new virtual machine with Ubuntu, and VirtualBox hasn’t detected an existing operating system on the virtual disk you created. This is perfectly normal for a fresh installation. This option is exactly what you want since you’re creating a new Ubuntu system on the virtual machine. Don’t worry, it won’t erase anything on your physical computer. It will erase the virtual disk (which is currently empty anyway) and prepare it for the Ubuntu installation. It refers to formatting the virtual disk you allocated for the Ubuntu installation within VirtualBox.

(3.9). Select your location and click continue.

Setting the location

(3.10). Set up your user account credentials and authentication details, where:

  • “Your name”: Your real name, which is optional and used for display purposes.
  • “Your computer’s name”: hostname, used for network identification, sharing, and remote access.
  • “Username”: Username, used for login credentials for user authentication.
  • “Password”: choose a strong password that comprises “capital, small, digits, and symbols.”

Credentials

The installation process might take some time.

Installation Process

(3.11). Once complete, you’ll be prompted to restart the virtual machine to use the new installation. Remove the virtual media (ISO file) from the settings before restarting.

Restarting the machine

(4). BOOTING INTO UBUNTU

(4.1). Select your virtual machine and click “Start.”

(4.2). You’ll be presented with the Ubuntu login screen. Enter your username and password created during installation.

Login details

The virtual machine will boot into the newly installed Ubuntu system.

Ubuntu Ready

CONGRATULATIONS!!! You’ve successfully installed Ubuntu on your VirtualBox virtual machine. Now you can explore the Ubuntu desktop and start using it. CHEERS!!!😁😁😁

Top comments (1)

Collapse
 
czarjulius profile image
Julius Ngwu

Very informative.