In this case, we will elaborate on how to do this using a current version of Windows 10, and our target OS will be Ubuntu 20.04 LTS. By the way, if you ever wondered what LTS means: LTS stands for long-term support, meaning updates, support, and bug fixes are granted for up to 60 months after release. Ubuntu is released twice a year – in April and October – which results in their version designation. So 20.04 LTS means it was released in April 2020 and will be supported until April 2025. LTS versions of Ubuntu are usually released in April in even years, so every two years.
Linux comes in various distributions, and depending on which source you trust, different ones are the most popular. We will attach a poll below this post to evaluate our readers’ used distribution, but we assume the information to be correct until then. According to various sources, the 10 most popular Linux distributions are:
- Cent OS
- Red Hat
- Arch Linux
- Linux Mint
I am sure this isn’t the correct order, and the chances I even missed popular ones are high. This is merely my personal assessment. But I am also pretty sure I never used 6 of these 10. Some might want to stone me, but in my opinion, the choice of the specific Linux OS is more a taste than a functionality decision.
Reasons to use Linux
Even so, this shouldn’t be an article about how awesome Linux is. If you are here, you most likely have your reasons and decided you want to use a Linux distro. Nevertheless, I will name a few reasons that should motivate you even further to use Linux for development.
Linux was first released in 1991, 6 years after the first Windows version, enough time to look into some major problems the Windows OS had, such as the vulnerability. Linux was designed to be secure. Many actions are restricted to a superuser, the Linux equivalent to an administrator under Windows. Thereby viruses and malware can do little to no harm to your system. Some distributions even deactivate the so called root user by default, increasing the security even more. If not, a profound first step under Linux should be to create a new user with Sudo-rights instead of using the default user with overpowered root rights.
Another reason for high security is its open-source nature. Since everyone can take a look into the very depths of Linux and any of its components, basically, every security issue has already been found by someone and has been fixed.
Did you ever wonder why your Windows machine seems to slow down significantly after like a year? Me too. And I can’t tell you why that is, but what I can tell you is that my Ubuntu distribution seems to run the same speed no matter how long it is installed.
Another huge advantage is that it doesn’t need to be restarted after each minor or major update. You may install the update and keep it running. The kernel itself is very stable and nearly immune to crashes.
These are also why Linux servers are that popular – they naturally have very high uptime and thereby perfectly fit the needs of many in the current now-economy.
Besides being totally free of charge (we all know developers are always broke), Linux supports developers in several ways.
It supports nearly every major programming language and a nearly endless variety of applications and IDEs. But the most compelling reason for myself is the Bash console. Bash is short for Bourne-again shell. Its a tribute to the original UNIX shell inventor Steve Bourne. Nearly any task and action on the OS can be performed on the shell with ease, and it is effortless to automate complex tasks.
Hypervisor/Virtual Machine Monitor
Before we jump right into 3 of many possible ways to use Linux under Windows, I want to make some notes about the Hypervisor or Virtual Machine Monitor (VMM) as it is crucial for deciding which technique to use in which specific cases.
A hypervisor can be classified as one of two possible types: type 1 and type 2. The type 1 hypervisor is also called a bare-metal hypervisor, and type 2 is often called a hosted hypervisor.
Even though the principle now seems obvious, not everything you may virtualize directly on your OS is instantly a type II hypervisor. For instance, the Windows subsystem for Linux (WSL) is available in two versions, 1 and 2. WSL version 1 is a type 2 hypervisor, whereas WSL version 2 is a type 1 hypervisor as it uses the hyper-v technique.
Why is it important?
In short: performance. The additional layer in a type 2 hypervisor increases the time instructions need from the OS to the hardware. Even though these times are nearly non-measurable, the slightly increased latency sums up.
But why would anyone use a type 2 hypervisor then? Because its easier. For the type 1 hypervisor, your hardware must be hyper-vised directly by your operating system (OS), whereas in the type 2 hypervisor, the host OS will take care of all the drivers and translations. Also, if you think of techniques like Docker, it can even be intended that the OS runs decoupled from direct contact to the hardware.
Using Ubuntu with VMWare Player
The first way I want to show to use Linux Ubuntu 20.04 with Windows 10 is the VMWare Player. The VMWare Player is a type 2 hypervisor and an enterprise software by VMWare. It is reasonably priced and even free for personal usage in the workstation version. You may find it at:
How to set up VMWare Player
The installation of the VMWare Player is straight forward, and you shouldn’t encounter any issues. However, you may have to enable the virtualization feature of your CPU in your BIOS to run a virtual machine with it. As this is different to every CPU and mainboard, I can’t tell you if it is enabled by default or where you may find it if it isn’t. You should find this information in your mainboards documentation or various posts on the net.
Once you have installed the player and downloaded a Linux Ubuntu installation image (https://releases.ubuntu.com/20.04/), you can create a virtual machine via “Create a new Virtual Machine”. This, again, is straightforward, and you shouldn’t encounter any issues.
Using Ubuntu with Windows Hyper-V
Another way to use Linux Ubuntu 20.04 with Windows 10 is Hyper-V. Hyper-V is a Windows built-in feature to host virtual machines. It is available under Windows 10 Pro and Windows Server 2008 R2 or later. Hyper-V is a type 1 hypervisor; thereby, it is slightly more efficient than the VMWare Player. But I honestly can’t see any obvious performance differences on the frontend.
How to set up Hyper-V
Before you follow the steps, you have to enable the virtualization feature of your computer CPU. As I said, Hyper-V is a Windows feature; there is nothing to download or install. Navigate to “Turn Windows features on or off”:
Once you’ve selected Hyper-V and restarted your computer, the Hyper-V Manager is available in your apps. From here on, everything is easy to grasp, and you shouldn’t encounter any issues.
Using Ubuntu with WSL (Windows Subsystem for Linux)
Last but not least, there’s another way to use Linux Ubuntu 20.04 with Windows 10 is WSL, the Windows Subsystem for Linux. As described in the Hypervisor section, WSL comes in two major versions: WSL and WSL2. Though this sounds like WSL2 is simply the successor of WSL, it isn’t the case. As WSL is a type 2 hypervisor and WSL2, a type 1 hypervisor, they both have their determined usage and reason for existence. Microsoft announced that they do not desire to discontinue development or support for either of these versions.
|Feature||WSL 1||WSL 2|
|Integration between Windows and Linux||✓||✓|
|Fast boot times||✓||✓|
|Small resource foot print||✓||✓|
|Runs with current versions of VMware and VirtualBox||✓||✓|
|Full Linux Kernel||✗||✓|
|Full system call compatibility||✗||✓|
|Performance across OS file systems||✓||✗|
Depending on the specific case, you should decide yourself which version fits you better.
WSL comes without a graphical interface. Its purpose is simply to use a Linux kernel/file system and all its advantages.
How to set up WSL
The installation process has improved significantly in the last years. First, navigate to your windows features and enable “Windows Subsystem for Linux” and “Virtual Machine Platform”.
Alternatively use these commands in the shell to activate the features:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart you machine. Now you can set the desired version of your WSL via:
wsl --set-default-version 2
If you encounter the error, “WSL 2 requires an update to its kernel component. For information, please visit https://aka.ms/wsl2kernel“, go to https://docs.microsoft.com/de-de/windows/wsl/wsl2-kernel and download and install the Linux kernel update package.
Next, go to the Microsoft Store and install “Ubuntu 20.04 LTS” for free. You may now use WSL by simply opening the “Ubuntu 20.04 LTS” app or executing “wsl.exe” via the command prompt.
If you encounter any registration issues like “The virtual machine could be started because a required feature is not installed” when installing Ubuntu, this is possible because you did not activate your CPUs virtualization feature yet. Check out your mainboard’s documentation to determine how to activate it or google it (as any sane computer scientist would do).
As you can see, WSL even works on a VM itself, which can be a major advantage.
Some last words
No matter for which solution you decide, all these solutions have their pros and cons but are, in my opinion, also the best solutions you will be able to get your hands on for free. However, this list isn’t complete, and there are many substitutes available for each of these. If you don’t need your Windows features or rely on any applications that run solely under Windows, you could also consider installing it directly to your hard drive.
I hope I could bring the available methods on how to use Linux Ubuntu 20.04 with Windows 10 closer to you.
Below we attached the promised poll about your OS for development. If you encounter any issues, don’t hesitate to write to use or comment, we will look into it and supplement it here.
I am a developer and entrepreneur from Germany. I chose studying computer science because I love building things. I am of the opinion that there isn’t one truth (especially for computer science concepts) and whoever claims so isn’t that trustworthy in my eyes. I constantly try to improve things and myself. In my spare time I support businesses by offering them most of my services for free. Beside that I am kind of addict to e-learning courses.