Quantcast
Viewing all articles
Browse latest Browse all 314

Running Ubuntu in VirtualBox on Windows/Mac [Tutorial]

Here’s a straightforward set of instructions (with lots of screenshots) on how to set up Ubuntu Linux in VirtualBox for running Ubuntu in a Virtual Machine on Windows 10 and macOS.

VirtualBox allows you to set up and run virtual machines on your computer easily.  A virtual machine is a whole computer, virtualized running on top of your current operating system – allowing you to try out and experiment with new operating systems and tools without reformatting your computer.

Download and Install Virtualbox

The first step: head to the Virtualbox website to download VirtualBox:

https://www.virtualbox.org/

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 2

Click on the big ‘Download’ button to download Virtualbox

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 3

Then, select the package for your computer’s operating system – in my case Windows.

Once downloaded, run the VirtualBox installer.  If you’re on macOS, things will look a bit different, but the steps will be largely the same.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 1

Click yes to acknowledge that you might lose internet for a few moments during the install.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 4

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 5 1

The default install options are all fine for our purposes.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 6

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 7

Click ‘Install’ when you’re ready to go.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 9

You’ll see a bunch of prompts to install VirtualBox drivers – click ‘Install’ for each. Whether or not you want to be prompted for every further drive from Oracle is up to you – I prefer not to select ‘Always Trust’ so that I know what’s being installed on my system.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 10

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 11

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 12

VirtualBox is installed! Click ‘Finish’ to continue and launch VirtualBox.

Download Ubuntu

To download Ubuntu, visit:

https://ubuntu.com

…navigate to the downloads section and click on the big green ‘Download’ button.

I recommend Ubuntu Desktop for beginners as it has a graphical interface and a bunch of pre-installed software to help you get started.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 14

Create & Configure a Virtual Machine in VirtualBox

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 13

Back to the VirtualBox window, click the ‘New’ Button to create a new virtual machine.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 15

Fill out the name for your virtual machine and select the Type and Version to match the version of Ubuntu you have downloaded. The machine folder can be left at the default.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 16

Select the amount of RAM the virtual machine should have. 1024MB (1GB) is the bare minimum; you should probably use at least 2048MB if your computer, which is running VirtualBox, has more than 4GB of RAM.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 17

Leave the option to create a new virtual hard disk at the default and hit ‘Create.’

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 18

Again, the default option ‘VDI’ is the one we want here.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 19

Keep the default ‘Dynamically allocated’ option and continue.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 20

Select the size for the virtual hard disk your Ubuntu virtual machine will use. At least 20GB is recommended (if you have space). As it will be dynamically allocated, it won’t use up this space all at once – the virtual hard disk will grow in size as needed until the 20GB limit is reached.

Start the Virtual Machine and Install Ubuntu

The virtual machine is now configured – let’s install Ubuntu!

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 21

Now that the virtual machine is created, the main VirtualBox window will show again. Click the green ‘Start’ button to start the new virtual machine.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 22

You’ll be prompted for a startup disk – this will need to be the Ubuntu install disk image previously downloaded. Click on the folder icon to choose it.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 23

You’ll be presented with a window to choose which disk to load – click on ‘Add’ to add the Ubuntu disk to the list.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 24

Navigate to the downloaded Ubuntu disk image location and select it, then click ‘Open.’

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 25

The Ubuntu installer will now appear in the list – select it and then click ‘Choose.’

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 26

Click ‘Start’ to start the virtual machine with the chosen disk image.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 27

The Ubuntu installer will boot automatically after running a few checks. VirtualBox will display some warnings about mouse/keyboard integration. They can be dismissed.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 28

When the installer is ready, click ‘Install Ubuntu and follow the prompts.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 29

Select your keyboard layout.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 30

Choose your installation options – the defaults should be fine.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 31

As we’re using a new virtual hard disk with no data on it, the default option of erasing it is fine.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 32

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 34

Fill out the details for the Ubuntu user account. Choose a secure password – this account will have administrative rights.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 35

The installer will then complete the installation while displaying some helpful messages.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 37

When it’s done, you’ll be prompted to restart the virtual machine.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 38

The installation disk image will have been automatically disconnected, so go ahead and press ENTER to continue.

Logging in to New Ubuntu Virtual Machine For the First Time

Ubuntu is now installed – let’s see what it can do!

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 39

The Ubuntu loading screen. Further mouse/keyboard integration warnings can be dismissed.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 40

Click on your username to log in.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 41

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 42

On the first run, you’ll see many welcome screens giving you the option to connect various accounts. Ignore or use them as you see fit.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 43

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 44

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 45

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 46

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 47

Go ahead and install any updates if prompted. Staying up to date is a good thing.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 48

The Ubuntu desktop ready to use (almost).

Installing VirtualBox Guest Additions in Ubuntu

We’re almost there – Ubuntu is ready to use, but you’ll probably notice it’s in a window that doesn’t fill your screen.  Installing the VirtualBox Guest Additions in Ubuntu will add support for dynamically resizing the Ubuntu desktop to fit whatever size you drag the VirtualBox window to, or even go full screen.  It also adds the ability to share folders with your virtual machine along with a bunch of other useful stuff.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 57

First, we need to install some dependencies that VirtualBox Guest Additions require. Open the terminal by clicking on the dots in the bottom-left of the screen and searching for ‘Terminal,’ and clicking on the icon.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 59

Once the terminal is ready, run the following commands:

sudo apt update

sudo apt install build-essential gcc make perl dkms

This will install the packages the VirtualBox Guest Additions installer requires.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 60

Enter Y to confirm the installation of the dependencies if prompted.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 49

Next, in the VirtualBox window, click on the ‘Devices’ drop-down and select ‘Insert Guest Additions CD Image.’

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 50

Open the file browser by clicking on the folder icon in the left menu bar and then click on the newly inserted disk image in the left panel.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 61

If you aren’t automatically prompted, click the ‘Run Software’ button in the top right of the file browser, then click ‘Run’ to run the installer.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 52

Enter your password if prompted.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 62

You’ll see a bunch of text fly by while the installer does its thing.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 63

When done, you’ll get a message about restarting your computer and be asked to press Return to close the window – do so.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 55

Final step – restart! Click on the down-arrow icon in the top-right of the screen and then click ‘Power Off.’

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 64

…Then click ‘Restart.’

All Done!

Your Ubuntu virtual machine is now ready to use – and the screen will resize to fill the screen on the Windows 10 or Mac computer hosting it.

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 65

Image may be NSFW.
Clik here to view.
ubuntu virtualbox 66

Once you’re up and running, be sure to visit LinuxScrew in your new Ubuntu virtual machine if you need any tips on using your new OS.

View the original article from LinuxScrew here: Running Ubuntu in VirtualBox on Windows/Mac [Tutorial]

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 314

Trending Articles