How to install Windows on Linux: After reading my guide on how to install Ubuntu, have you decided to use this famous Linux distribution as your main operating system but now you need to use software compatible only with Windows and you don’t know how to do it? No problem. Just like on Windows (and macOS), also on Linux you can create a virtual machine on which to install another operating system to be used without affecting the real system.
To do this you can use VirtualBox, the famous free virtualization program that I told you about several times here on the blog. It is extremely easy to use and allows you to install any version of Windows on Ubuntu (or other Linux distro) in just a few clicks. If you want to learn how to install Windows on Linux using it, read on: find all the information you need right below.
I used Ubuntu for the tutorial, to be precise Ubuntu 18.04, but the indications in the article should be valid for all major Linux distributions. As for the operation of VirtualBox, however, there are certainly no problems, as the software has the same interface on all systems and all platforms for which it is available. Without these necessary clarifications, I can only wish you a good reading and a good fun!
Before we get to the heart of the tutorial and find out how to install Windows on Linux, you need to get yourself aISO image Windows or a real installation disk of the Microsoft operating system.
The Colossus of Redmond allows you to download the ISO images of Windows 10, Windows 8.x is Windows 7 (the latter only after entering a valid product key and only for non-OEM versions of the system, therefore purchased separately and not pre-installed on computers), while Vista and XP are now obsolete and therefore no longer available.
If you need a hand to understand how to download windows 10, how to download windows 8.x or how to download windows 7, also consult the tutorials that I have dedicated to these themes. If, on the other hand, you have a Windows installation disk and want to turn it into ISO, install Brasero (free burning software compatible with all major Linux distros, it is also found in the official Ubuntu store) and use it following the instructions I gave you in my tutorial on how to create ISO image.
As easily understood, the ISO images of Windows are not 100% free: they can be downloaded and used at no cost, but they need to be activated via a valid product key, just like the copies of Windows installed on “real” computers.
If you are interested, you should know that there are also Windows images prepared for use in virtual machines: these are image files of VirtualBox disks or other similar software which, once “fed” to the latter, allow you to use the Microsoft system without having to face any installation procedure.
Some of these images can be found directly on the Microsoft website, where images are available to test Internet Explorer and Edge (i browser from Microsoft) on various versions of Windows. To download Windows for VM images from the Microsoft website, you must select the version of Windows you prefer the most (e.g. MSEdge on Win10 for Windows 10) from the drop-down menu Virtual machine, the program VirtualBox from the drop down menu Select platform and you have to click on the button Zip download that appears below. Be careful to download a version of Windows (32 or 64 bit) compatible with the architecture of your Linux system.
Virtualize Windows on Linux
Once you get the Windows disk image, you can take action: the first step you need to do is download VirtualBox. If you use Ubuntu, therefore start the integrated store (Ubuntu Software) by clicking on the icon of shopping bag placed in the desktop sidebar and search “Virtualbox”by clicking on the icon of magnifying glass which is located at the top right and typing the name of the program in the appropriate field that appears on the screen.
After searching, click on the icon VirtualBox, then on the button Install, type in your user account password on Ubuntu and come on Submit to start the automatic download and installation of the program.
If you use a Linux distro other than Ubuntu, you can download VirtualBox by connecting to program website and clicking on the link relating to the operating system you use (e.g. Debian 9). There are two editions of the application, one 32-bit (i386) and a 64-bit one (AMD64): choose the one best suited to the computer and operating system you are using.
Download is complete open, double clicking on it, the file you just downloaded (e.g. virtualbox-[versione]-Ubuntu-bionic_amd64.deb) and, in the window that opens, click on the button Install to install VirtualBox on your PC. Once this is done, you can move on to creating the virtual machine on which to install Windows.
For install Windows on Linux with VirtualBox, start the program by looking for it in the main menu of your distro (on Ubuntu it opens by clicking on the icon with 9 white dots located at the bottom of the left sidebar), then click on the button New present in its main window (top left).
Then type in the first name you want to assign to the virtual machine with Windows in the appropriate text field, select the version of the operating system you want to install from the drop-down menu Version and click on the button Forward to adjust settings related to RAM to be dedicated to the virtual machine. Feel free to leave everything as it is, if you have no particular needs, and click on the button Following.
Now choose what kind of hard disk equip the virtual machine by setting its format, the type of allocation it must have and its capacity. I advise you to leave all the default options active: Create a new virtual hard disk now, VDI is Dynamically allocated. In this way, you will get a hard disk in VDI format (the VirtualBox format) with an optimized capacity for the operating system to be installed in it and a type of dynamic allocation, which will take up space on the hard disk of the PC (the real one) only when necessary.
Finally, indicate the maximum space that the virtual machine hard disk must occupy on the computer disk and click on the button Create to finish the procedure and get your virtual machine.
Now you have a virtual machine on which to “run” Windows, but you have not yet installed the operating system in it. To do this, you have two options at your disposal: use the Windows installation disc or an ISO image of the latter.
Whatever your choice, double click on the name of the virtual machine you just created in the main VirtualBox screen. In the window that opens, if you want to use aWindows ISO image, click on the icon of yellow folder and select the file in question. If, on the other hand, you intend to use a real disk for the installation of the operating system, expand the drop-down menu located in the center of the window and select theDVD player unit. When the operation is complete, click on the button Starts.
Now you just have to complete the Windows installation procedure normally, as if I were performing it on a real PC and not in a virtual machine.
If you are not very familiar with Windows installations, I invite you to read my guides on how to install windows 10, how to install Windows 8.x, how to install windows 7, how to install windows vista is how to install windows xp to learn more about the topic. It’s very simple, don’t worry.
Once the Windows installation is complete, I recommend you install the Guest Additions, additional drivers that allow you to increase the level of integration between the virtual system (Windows) and the main system (Linux) to put the two environments in communication, allowing for example the sharing of the clipboard and data and a better visualization of the graphic contents.
To proceed with the installation of the Guest Additions, with the virtual machine started, go to the menu Devices> Insert the image of the Guest Additions CD … (above) and, in the autorun window that appears in Windows, choose to start the executable. If you are asked to download Guest Additions from the Internet, accept by clicking on the button Download.
So always press up Forward and, at the end of the setup, agrees to reboot the system. If you do not see any autorun window, open theFile Explorer Windows, select the item Computer / This PC from the left sidebar, select the virtual unit of the Guest Additions and proceed with the manual start of the installation of the latter.
Import of an existing image
You downloaded a Windows image file ready for use in virtual machine? Perfect: then, instead of creating a new virtual machine within the program, select the item Import virtual application from the menu File (top left), then click on the icon of yellow folder, select the OVF image file in your possession, presses on the buttons Following is It matters And that’s it. You will find yourself a virtual machine ready for use on the main VirtualBox screen.
Alternatively, if you downloaded a format disk image VDI, VHD or VMDK (therefore an image of the disk of the virtual machine and not of the virtual machine itself), you must create a new virtual machine as I explained to you in previous step of the guide but, when you get to the disc creation step, you have to select the option Use an existing virtual disk file.
Then you have to click on the icon of yellow folder that appears at the bottom, you must select the image file that you have downloaded from the Internet and you must confirm your choice by clicking on the button Create. In this way you will get your virtual machine with Windows ready for use.
Install Windows and Linux in dual-boot
If you want to install Windows on Linux in the sense that you intend to create a real one dual boot system in which to choose, each time the PC is turned on, which operating system to run between Windows and Linux, you must partition the disk in order to create a partition to be allocated to Windows. Then you have to boot from the installation disc of the Microsoft operating system and you have to install a new copy of the latter on the previously created partition.
For disk partitioning, I recommend using the free software GParted, which I told you about in my tutorial on how to partition a hard drive, while for the installation of Windows you can refer to my guides on how to install windows 10, how to install Windows 8.x is how to install windows 7 (previous versions of the Microsoft operating system are not recommended, as they are obsolete and no longer officially supported).
If you have already created a dual boot system by installing Linux on Windows but, when you turn on the PC, you are not asked which operating system to run, you should be able to solve the problem by restoring GRUB, the Linux boot manager: if you want more information about it, read my guide on how to reset GRUB.