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:
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 39 ubuntu virtualbox 9](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-9.png)
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.
Download Ubuntu
To download Ubuntu, visit:
…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.
Create & Configure a Virtual Machine in VirtualBox
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 45 ubuntu virtualbox 15](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-15.png)
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 46 ubuntu virtualbox 16](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-16.png)
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 50 ubuntu virtualbox 20](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-20.png)
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!
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 51 ubuntu virtualbox 21](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-21.png)
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 52 ubuntu virtualbox 22](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-22.png)
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 53 ubuntu virtualbox 23](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-23.png)
You’ll be presented with a window to choose which disk to load – click on ‘Add’ to add the Ubuntu disk to the list.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 57 ubuntu virtualbox 27](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-27.png)
The Ubuntu installer will boot automatically after running a few checks. VirtualBox will display some warnings about mouse/keyboard integration. They can be dismissed.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 61 ubuntu virtualbox 31](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-31.png)
As we’re using a new virtual hard disk with no data on it, the default option of erasing it is fine.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 64 ubuntu virtualbox 34](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-34.png)
Fill out the details for the Ubuntu user account. Choose a secure password – this account will have administrative rights.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 67 ubuntu virtualbox 38](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-38.png)
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!
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 71 ubuntu virtualbox 42](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-42.png)
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.
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 78 ubuntu virtualbox 57](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-57.png)
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.
sudo apt update sudo apt install build-essential gcc make perl dkms
This will install the packages the VirtualBox Guest Additions installer requires.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 81 ubuntu virtualbox 49](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-49-1024x576.png)
Next, in the VirtualBox window, click on the ‘Devices’ drop-down and select ‘Insert Guest Additions CD Image.’
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 82 ubuntu virtualbox 50](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-50.png)
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 83 ubuntu virtualbox 61](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-61.png)
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.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 86 ubuntu virtualbox 63](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-63.png)
When done, you’ll get a message about restarting your computer and be asked to press Return to close the window – do so.
![Running Ubuntu in VirtualBox on Windows/Mac [Tutorial] 87 ubuntu virtualbox 55](http://www.linuxscrew.com/wp-content/uploads/2021/05/ubuntu-virtualbox-55.png)
Final step – restart! Click on the down-arrow icon in the top-right of the screen and then click ‘Power Off.’
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.
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]