Thanks to virtualization, it is possible to install a Linux distribution in Windows 10 in the simplest way. In this tutorial, we will show step by step how to create a virtual machine and install Ubuntu in it using VitualBox, one of the most popular virtualization tools.
To use Linux alongside Windows, we have the choice between installing the two systems in dual-boot or one inside the other using a virtual machine. Developers familiar with the Linux programming environment, but who use Windows on a daily basis have recently been able to use the Bash command line interpreter directly in Windows 10. But that doesn’t give access to the GUI and everything else.
Several software programs allow you to create a virtual machine in Windows 10: VMWare, Parallels, Virtual PC or even VirtualBox, to recite nobody else but them. We chose VirtualBox for this tutorial. It is easy to use and has the advantage of being completely free.
Install a Liniux distribution in Windows 10 with VirtualBox
Installing Ubuntu or another Linux distribution on a virtual machine inside Windows 10 has many advantages. Unlike dual-boot, it is possible to easily switch between the two systems without having to restart the PC. In addition, Linux is not likely to affect the proper functioning of the host system. The only downside is that the resources are shared. But you can control how much RAM or storage to allocate to the virtual machine with a good compromise.
1. Download and install VirtualBox
Go to the VirtualBox official website to download the latest version of the tool. It is available in Windows, Linux and macOS versions. Select the one corresponding to your operating system, in this case “Windows hosts” if you are under Windows 10.
- Launch the installation executable and click on next.
- You can choose how the features will be installed. We recommend that you continue with the installation, leaving the default configurations. All the necessary items will be installed.
- The wizard displays a warning message about a momentary interruption of the network connection. Click on Yes.
- During installation, the wizard may ask you for certain permissions. Validate them all to continue the process.
- Once the installation is complete, you can run Virtualbox by checking the “Start Oracle VM VirtualBox after installation” box. Then click on “Finish”.
2. Create a new virtual machine
VirtualBox has many options that are worth exploring by reading the program’s help file. But to create a new virtual machine, simply click on the “New” icon in the toolbar to launch the creation wizard.
The first thing to do is to define the name, the type of virtual machine as well as the version you want to create. In our case, we chose to name the machine Ubuntu. The type will be Linux and the 64-bit Ubuntu version.
On the next screen, you will have to define the amount of memory to allocate to the virtual machine. The memory will be shared with the main system each time the virtual machine is started. You should not go below the recommended minimum. You should also make sure that you leave enough memory for the host operating system to continue running. If you have enough memory, you can slide the bar up to 1024 or 2048 megabytes.
The next step will be to create a virtual hard drive. Like shared memory, this is the storage space that will be allocated to the virtual machine. Leave the option “Create a new hard drive” and click “Create”.
In the next step, select the type of hard drive to create. Leave the option “VDI” checked by default which is none other than the native file type of VirtualBox. You will then be asked to choose how the hard drive is created. You can opt for a hard drive of fixed size or dynamically allocated size.
No partitioning occurs on the actual hard drive. VirtualBox will only create a file that behaves like a virtual hard drive on the new machine. A fixed-size disk immediately occupies the maximum allocated size. The dynamic disk creates a VDI file whose size changes according to the space occupied by the virtual machine until it reaches the specified maximum size.
You are now prompted to define the disk space you want to allocate to the Ubuntu virtual machine. Choose the size that’s right for you. By default, the wizard recommends 10 GB.
3. Install Ubuntu in VirtualBox
The virtual machine has now been created. You can launch it by pressing the “Start” button located at the top of the toolbar. The first boot requires selecting a boot disk. VirtualBox does not ship the system natively. It will therefore be necessary either to have a physical boot disk, or an ISO file of the Linux distribution to install. Click on Start then wait.
You have the choice between trying Ubuntu and installing it. If you decide to try it first, it will still be possible to start the installation by double-clicking the “Install” icon on the desktop. Then follow the instructions until the installation is complete.
3.Install the guest additions
When viewing Ubuntu in full screen mode, you will notice poor scaling. To have the best possible experience, it will be necessary to install “guest additions”. These are additional drivers that are installed at the level of the virtual machine in order to improve its performance: better management of graphics, better behavior of the mouse, sharing of the clipboard and directories between the two systems.
To install the additions, simply go to “Peripherals” at the menu level then click on “Insert CD image of Guest Additions”.
The ISO image of Guest Additions appears on the desktop.
Double-click the VBox_GAs_x virtual CD. A window appears with the contents of the CD. Select the autorun.sh file then click on “Launch software” at the top right and enter your password.
A terminal window will open and commands will run. Once the operation is complete, you will need to restart the virtual machine. Ubuntu is now ready to use. You can run it inside Windows 10 when needed. It’s quick and easy. You even have the option of freezing your work and picking up exactly where you left off on restart.