We earn commission when you buy through affiliate links.
This does not influence our reviews or recommendations.Learn more.
If you have a single computer, youll have to pick one operating system.
Luckily, theres a way to avoid choosing either of the two operating systems.
Why pick when you’re able to easily have both?
The Windows operating system allows you to leverage the power of Linux and Windows all from the same machine.
From Windows, it’s possible for you to run Linux applications and Linux commands.
The ability to run Linux commands from Windows is a game changer.
First, it allows you to have the best of two operating systems from one machine at no cost.
The tool that allows you to run Windows on Linux is the Windows Subsystem for Linux.
WSL supports x64 and Arm CPUs.
All these distributions are available for installation from the Microsoft Store.
you might also invoke Windows executables and access Windows files from the Linux Bash Shell.
WSL acts as a compatibility layer sitting between Windows and Linux.
Technically, WSL allows you to run unmodified ELF64 Linux binaries, thus providing an integrated experience.
Hyper-V provides hardware virtualization, which means that virtual machines run on virtual hardware.
On the Linux kernel interface running on Windows and provided by WSL, different Linux distributions can be installed.
These distributions provide a container-like environment with all dependencies and package management needed to run Linux applications.
Linux applications run within these distributions.
Why Use The Windows Subsystem For Linux?
Well, for a start, WSL uses fewer computer resources than running a virtual machine.
Another key feature of WSL is how easy it is to run Linux.
Virtualization can be complicated, and WSL avoids all of that.
To developers, WSL allows you to enjoy the best of two worlds.
With WSL, you wont run into compatibility issues because youre using tools that only run on Linux.
How to Install Windows Subsystem for Linux
1.
The Windows 10 version should be built 19041 and higher.
ensure you are connected to the internet.
First, a virtual machine platform platform will be installed, and then finally, WSL will be installed.
Be patient as this can take a while.
Once the process completes, you might confirm WSL has been installed by running wsl install again.
In case you see a help page for WSL as shown below, the installation was successful.
The next step is to install a Linux distribution to use with WSL.
However, your input is still captured.
An alternative to installing a distribution from Powershell is to open Microsoft Store and Search for WSL.
Youll be presented with all available distributions.
ClickGetto install your desired distribution
7.
Windows Subsystem for Linux is an excellent way to run Linux commands on Windows.
Let us look at two emulators that can help you run Linux commands on Windows.
As their tagline states, Cygwin aims to provide a Linux feeling on Windows.
However, Cygwin does not allow you to run Linux applications on Windows.
Cygwin works with all x86_64 versions of Windows, starting from Windows 7.
To install Cygwin:
1.
Navigate to theirinstallationpage download the setup-x86_64.exe file and run it
2.
Go through the first few screens on the installation wizard screen, clicking Next to keep the default selections.
When selecting the packages to install, keep the default section.
That is Under view; confirm it is Category that is selected then click onNext.
This will take you to the review and confirm changes screen.
Click onNextto start installing Cygen.
Wait for the installation process to finish.
- choose Finish to complete the installation process.
- it’s possible for you to find Cygwins icon on the start menu or on the Desktop.
Double-click to launch Cygwin
8.
Use Linux Commands on Windows using QEMU
QEMUis a generic and open-source machine emulator and virtualizer.
To install QEMU,
1.
Youll be presented with the QEMU setup wizard window.
Click Next to proceed.
Wait for the installation to complete and click Finish.
The next step is now adding the file path to where QEMU was installed to our environment variable.
To do this, navigate toMy Computer->Local Disk C->Program Files->qemuas shown:
5.
Highlight and copy the file path to where QEMU is installed in your machine
6.
Open WindowsSettings, click onSystem, scroll the left menu bar, and select About.
In the About page click onAdvanced system settingsto pop crack open the System Properties window
7.
In the System Properties Window in theAdvancedtab, click onEnvironment Variables
8.
On the Environment Variables page, double-click onPath, to add the path where QEMU was installed.
Click onNewthen paste in the path URL you copied and click onOkayto add it.
Click onOkayon the Environment Variables Windows and System Properties windows to save the changes and end the windows.
Additionally, verify to always back up your important files in case anything goes wrong.
You may also explore WSL2 Capabilities, the installation process, and how to use it effectively.