Stepping into Ubuntu Linux: A VirtualBox Installation Guide.
Tags: linux, ubuntu, virtualmachine, linuxserver
Published: 2024-05-19 09:57:40

## 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](https://www.virtualbox.org/wiki/Downloads), 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](https://ubuntu.com/download/desktop) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xbxpj8uti21al8r0tit.JPG)

> (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ly2nuo9ly1l7lo0q9rpb.JPG)


> (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1dwau9cajclum96zkpq.JPG)

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

![Virtual HardDisk creation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jmg5mqv3eknaeaz9pqe4.JPG)

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


![Hard disk file type selection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cfm65obq1kz5vy9zr0w0.JPG)

> (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5n2njmztvmux3i3wmh7s.JPG)

> (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zicg2l4r3lpd771tnds.JPG)

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


![Newly created Ubuntu Virtual HardDisk](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wfq6r457tg77m1mj1pzg.JPG)

## (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/citng1fmcvb3t5v3moim.JPG)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5ukaqfnyaleovmjfxkr.JPG)

> (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/epg1o3rljhbrp5uheaeb.JPG)

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


![Installation type](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxg8rite02cnje4lo7sy.JPG)

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


![Installation type](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ffdxhxqjael574fka1bz.JPG)

_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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovloxgvcmxzlpaqnlesz.JPG)

> 
(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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgoe8y6ht02wcymhx8qz.JPG)

The installation process might take some time.


![Installation Process](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/de8cue220qxvr4gogyjv.JPG)

> 
(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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ehuhqud2fppat7s2r6g.JPG)

## (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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jwfaek4h86uqwmru53l.JPG)

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


![Ubuntu Ready](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ywuf0ngv0sy6czh5mgb.JPG)

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