How to Create a Ubuntu Virtual Machine in Virtualbox

In this post, I will show you how to create a virtual machine that runs Ubuntu Linux in VirtualBox.

I will assume that you have already downloaded and installed VirtualBox. If not, you can get it for free from virtualbox.org.

Once you have VirtualBox installed, launch it and click the “New” button to create a new virtual machine.

How to Create a Ubuntu Virtual Machine in Virtualbox

Why use a virtual machine?

Using a virtual machine has many advantages. You can try out different operating systems without affecting your main computer, and you can run multiple operating systems at the same time.

Virtual machines are also useful for testing software and applications in different environments.

If you want to use Ubuntu on your main computer, you can install it alongside your existing operating system.

But if you want to try it out first, or if you want to run multiple operating systems at the same time, you can use a virtual machine.

In this tutorial, we’ll show you how to install Ubuntu in a virtual machine on Windows 10.

We’ll be using VirtualBox, which is a free and open-source virtualization tool.

What is VirtualBox?

VirtualBox is a type-2 hypervisor that is produced by Oracle. It can be installed on a number of host operating systems, including Windows, macOS, Linux, and Solaris.

A single VirtualBox installation can run multiple guest operating systems, each with its own virtual environment.

How to install VirtualBox on Ubuntu

If you’re using Ubuntu 14.04 or later, you can install VirtualBox from the Ubuntu Software Center. Just search for “VirtualBox” and click the Install button.

If you’re using an older version of Ubuntu, or if you want to install a more recent version of VirtualBox, you can download it from the Oracle website.

Once you’ve downloaded the file, double-click it to open it in the Ubuntu Software Center. Click the Install button to install VirtualBox.

How to create a virtual machine in VirtualBox

Assuming you have already installed VirtualBox, open the application and click the New button in the top left corner.

You will be prompted to give your new virtual machine a name; this can be anything you want.

Choose your operating system type as Ubuntu and select the version of Ubuntu you wish to install; if you’re unsure, choose the most recent version. For this tutorial, we will choose Ubuntu 64-bit.

You will now be asked to allocate memory (RAM) to your virtual machine. The more RAM you assign, the smoother your Ubuntu experience will be, especially if you plan on having multiple applications running at the same time.

As a general rule of thumb, aim for at least 1 GB of RAM (1024 MB). If you have 4 GB or more of RAM on your host machine, you can safely allocate 2 GB or more to your virtual machine.

VirtualBox will now prompt you to create a virtual hard drive for your Ubuntu installation.

A virtual hard drive is essentially a file that acts like a physical hard drive; it stores all of your data and settings for your Ubuntu installation.

It is recommended that you create a dynamic expanding hard drive, which starts off small but grows as you add files to it.

This saves space on your host machine’s hard drive since the file will only grow to accommodate the amount of data you put on it.

You will now need to specify where VirtualBox should store the file for your virtual hard drive.

By default, it should suggest storing it in the same directory as your other VirtualBox files; unless you have a specific reason for changing this location, leave it as the default. You can also name your virtual hard drive file whatever you want.

The next screen allows you to fine-tune the storage space for your virtual hard drive.

Unless you have specific storage requirements, leave everything at its default setting and click Create. Your new virtual machine has now been created!

How to install Ubuntu on a virtual machine

Installing Ubuntu on a virtual machine is a great way to try out the Linux operating system without harming your primary computer.

VirtualBox is a free and open source virtualization program that makes it easy to set up a virtual machine on any computer.

  1. Before you begin, you’ll need to download VirtualBox and the Ubuntu ISO file. You can get VirtualBox from the Oracle website, and the Ubuntu ISO from the Ubuntu website.
  2. Once you have both files downloaded, open VirtualBox and click “New” to create a new virtual machine. Give your machine a name (we’ll call it “ubuntu-vm”), select “Linux” for the type and “Ubuntu (64-bit)” for the version, and click “Next”.
  3. On the next screen, you’ll be asked how much memory to allocate for your virtual machine. We recommend allocating at least 2 GB of RAM. Once you’ve selected the amount of RAM, click “Next”.
  4. On the next screen, you’ll be asked to create a virtual hard drive. We recommend selecting “Create a virtual hard drive now”, and clicking “Create”.
  5. On the next screen, select “VDI (VirtualBox Disk Image)” for the disk file type, and click “Next”.
  6. On the next screen, select “Fixed size” for the storage type, and click “Create”.
  7. You’ll be asked to specify the size of the virtual hard drive. We recommend allocating at least 20 GB of storage space. Once you’ve selected the size, click “Create”.
  8. Your new virtual machine will now be created and appear in the list of machines in VirtualBox. To start it up, simply select it and click on the “Start” button.

How to configure Ubuntu on a virtual machine

The Ubuntu operating system is one of the most popular alternatives to Microsoft Windows and Apple’s macOS.

If you’re interested in trying it out, you can install Ubuntu on a virtual machine using the free VirtualBox program.

Here’s a quick guide to setting up an Ubuntu virtual machine in VirtualBox:

  1. Download and install VirtualBox from here.
  2. Download the Ubuntu installation ISO file from here
  3. Start VirtualBox and click the “New” button to create a new virtual machine.
  4. Choose Linux as the type of operating system and Ubuntu (64-bit) as the version. Give the virtual machine a name (e.g., “Ubuntu VM”) and click “Create”.
  5. Allocate at least 2 GB of RAM to the virtual machine and click “Create”.
  6. Select “Do not add a virtual hard drive” and click “Create”.
  7. In the “Storage” settings for your new virtual machine, click the “Empty” optical drive and select your downloaded Ubuntu ISO file. Click “OK”.
  8. Click the “Start” button to boot your new Ubuntu virtual machine for the first time. Follow along with the installation wizard, choosing your preferred language, time zone, keyboard layout, etc. When prompted, choose “Erase disk and install Ubuntu” to wipe any existing data on the virtual hard drive and install Ubuntu fresh.
  9. Once installation is complete, you can boot into your new Ubuntu virtual machine whenever you want by starting it from within VirtualBox

Conclusion

Assuming you have followed all the steps in this guide, at this point you should have a fully functional Ubuntu virtual machine up and running in VirtualBox.

You can now begin using Ubuntu as you would any other operating system, installing software, storing files, etc.

Keep in mind that since this is a virtual machine, any changes you make will only affect the virtual environment and not your actual host computer.

English