How to Run Linux on Windows with Virtual Box – Beginners Guide.
There are many ways to get Linux running on a Windows computer. You can use Wubi to dual boot Windows and Linux, OR create a separate partition on your hard drive and then install Linux on it, OR just run Linux from a live CD / stick, etc.
So, if you are a complete newbie trying Linux for the first time, then the easiest way would be to use virtual machine . But even that can be tricky if you’ve never used virtual machines before.
So, here is a step-by-step guide (with screenshots) on how to install VirtualBox and configure it to run Ubuntu (or any other OS like Android) on it.
What is a virtual machine?
In simple terms, a virtual machine is software that allows you to run an additional operating system inside a regular OS. And this newly created OS has its own RAM, storage, network cards, etc., which it shares with its parent computer.
Let’s say you want to test a new version of Windows for developers, but you don’t want to partition your hard drive. Or you want to use Instagram but don’t have Android, then using a virtual machine, you can run Android OS directly on your Windows computer.
In general, with a virtual machine, you can run other operating systems as a program.
What do you need?
Before we start, make sure you have the following items checked.
# 1 Decent Power Computer : Since we’re running two operating systems at the same time, it’s best if you try it on a decently built computer. Mine works fine with a 4 year old Dell laptop with 4GB of RAM and an i3 processor.
# 2 Decent Internet Connection: we will need to download two files – the virtual machine software and the ISO image of the OS you want to run inside it.
Which virtual machine should I choose?
There are many virtual machines such as VMware, VirtualBox or Parallels.
Each has its own pros and cons, but in this tutorial we’ll be using VirtualBox. Why? Well it’s free and open source, has a user-friendly interface and works on all platforms i.e. Windows, MAC and Linux
Part 1. Downloads
Run Linux on Windows using Virtual Box
Before we proceed with the installation and configuration, you first need to download the following two files from the Internet.
# 1 Download VirtualBox (110MB for Windows) from their official website.
# 2 Next, you will need to download the image file (.iso) of the operating system you want to run in the virtual machine. In this tutorial, we will download Ubuntu from the official site. If you are unsure which version of Ubuntu you should download, choose 14.04 LTS (1GB). It is more stable.
You can also use a different OS. The steps are the same. And once you have both downloads, place them on your desktop and follow the instructions below.
Part 2: Install
# 1 Install VirtualBox
Right click on the VirtualBox setting and run it from administrator name. And then install the package the same way you install any other program.
Since it is open source, you don’t need to worry about installing any ask toolbar. I suggest you follow the recommended settings.
You will see a warning like “your network may go down for a moment.” This is because the virtual machine will install a separate network adapter for itself. Don’t worry about it and click Next. When is complete, click Finish.
# 2 Setting up VirtualBox
We need to make sure the container (VirtualBox) is ready before uploading anything.
So, launch VirtualBox from a shortcut or start menu. A new window will open, here click New . Under the name field, write the name of your OS you are about to install.
You can give any name you want, but spelling the OS name will help you remember it in the future. In the type and version field, select the appropriate field for your OS. Then click Next.
In the next window, you will need to specify how much RAM you want to allocate for the VM.
If you offer too little, your VirtualBox will not work well , and if you give too much, your main OS will perform worse. For best results, use 25-50%. For example, if you have 4 GB of RAM, provide 1-2 GB of RAM for the virtual machine. Then click Next.
Now, when we use VirtualBox for the first time, we need to allocate hard disk space to it. Next time, , if you install a different OS on VirtualBox, you will be able to use this existing space. But for now, select create new virtual hard disk and click Next.
Select the first option as the type, such as VirtualBox Disk Image, and click Next.
You now have two options for storing on a new hard drive – dynamic and fixed allocation.
With dynamic allocation, the hard disk space is automatically increased. But sometimes it also gives errors like “you’re running out of space” , even if the HD expands as needed. So it’s always best to give the image a fixed size.
The next step is obvious: you will need to allocate space on your hard drive for the virtual machine. For most things, 8GB is enough, but just in case increase it to 16GB or even more if you think so. After that click “Create”. Changes will take a few minutes to complete. Click on the image for a larger view.
And it’s all. Your vessel (VirtualBox) is now ready. The next step is to pour liquid on it (Ubuntu).
# 3 Installing Ubuntu
Make sure your newly created partition is selected and then navigate to Setting Storage. Here you must specify the directory of the Ubuntu image file.
To do this, click on the little plus sign in the folder and add the ISO image location. After that click OK and close the window.
Now go back to the main window and click “Start”. This start button is equivalent to the power button on your computer.
A new window will open with a black screen and a bunch of text with a loading animation. This means that VirtualBox boots your OS from an image file.
Next, you will see the Ubuntu setup screen. Now you need to install Ubuntu on your computer. If you’ve ever installed another OS, this should sound familiar to you. Usually you need to select a language, specify a date / time / place and click “Continue”.
You only need to do this once, next time you will see the login screen, just like in a normal Windows installation.
Make sure your computer is charged. However, there is no need to connect to the Internet and you can skip updates for now.
Then select the HD partition where you want to install ubuntu. Since we already created a section at the beginning of the tutorial, select it and click “Install Now”.
Then select your time zone and click Next.
Now this is the final stage. Give a name to your computer and enter your username and password. You will need these credentials the next time you log into Ubuntu.
And click “Continue”. It will start installing the file to your drive. It will take a few minutes.
You will then be prompted to restart your OS (e.g. Ubuntu) and your OS is now installed on VM Ware
Part 3: Troubleshooting
So you have successfully installed ubuntu on your VirtualBox. However, there are a few tweaks to help make sure you are using ubuntu like a normal OS.
Problem 1: When you restart ubuntu, you will still see the boot screen instead of the login screen. This is because VirtualBox is still loaded from an image file and not from hard drives .
Solution: To change this, go to Settings System make sure Boot Order is set to Hard Drive Only, checking all other options. Now when you start your device, you will see the Ubuntu login screen.
Problem 2: Ubuntu window doesn’t resize.
Solution: To fix this, go to the device and click on Insert CD Image with Added Guest Mode a new dialog will appear.
C lick on the run.
Then the terminal will open, confirm the password again. It will run for a few minutes, and when prompted, it exits and restarts ubuntu.
You should now be able to use Ubuntu in a virtual machine as usual.
For most things, it works fine. You can use your computer’s keyboard and mouse to navigate VirtualBox, it even has a network adapter so you can use the Internet as well.
In general, you should be able to do whatever you need to do as usual, except for those that require graphics intensive use such as gaming or multitasking.
Hope this helps.