Linux is an operating system that’s open-source built on the Linux kernel. It is free to download and can work on Mac or Windows.
© Profit_Image/Shutterstock.com
Linux applications may be desirable for Windows users as well. Whether searching for strong command-line tools or an improved development platform, you can use Linux within Windows OS. There are several methods of achieving this, including virtual machines, WSL (Windows Subsystem for Linux), and Cygwin.
Below is a detailed guide on running Linux on Windows without acquiring a new computer or laptop.
Method 1: Virtual Machine
The simplest and most effective way to run Linux applications on Windows is through a virtual machine. Here are the steps for installing and setting up a virtual machine with Linux OS.
Step 1: Download Virtual Machine
Virtual machines enable you to use any operating system. Open your computer’s web browser, then search and download the Virtual machine you prefer using (VMware or Oracle). In this example, we will use VMware.
Step 2: Download Linux Distribution
Download the ISO file for a Linux distribution. Ubuntu is a popular choice that works well. Search Ubuntu on your browser and download the latest version.
Install the Linux distribution in the virtual machine like a regular computer.
Step 3: Install the Operating System
Launch the VMware workstation, then click “Create new Virtual Machine.” Select Installer disc image file” Image Option, then select the ISO file for the downloaded Linux operating system.
Step 4: Specify Disk Capacity
Specify how large you would like the disk capacity of your virtual machine to be.
Step 5: Boot the Operating System
Name the virtual machine, start the virtual computer to boot the operating system, and then proceed to the final steps of installation. After installation, you can use the virtual machine to run any Linux GUI applications.
Now you can use any Linux application on the virtual computer environment.
Method 2: WSL (Windows Subsystem for Linux)
WSL is a Windows feature that allows you to operate the Linux File System directly on Windows. It’s fully compatible with Windows tools. WSL is primarily intended for command-line tools, making it unsuitable for graphic-intensive programs.
Below are the steps to run Linux using WSL.
Step 1: Enable Windows Subsystem for Linux from Features
Search for Windows Features on the taskbar and tick Windows Subsystem for Linux.
Step 2: Restart your Computer
Once your modifications have taken effect, restart your computer by clicking the Restart now option.
Step 3: Open Microsoft Store
Click the Windows button on your taskbar, then click Microsoft store and select your preferred Linux distribution.
Step 4: Search for Linux Distribution
Type Linux in the search bar to see available options.
Step 5: Install Linux Distribution
Click the Linux distribution you would like to install. In this example, we will use Ubuntu.
Click Get to install Ubuntu on your computer
Step 6: Complete the Installation
Wait for Windows to finish downloading and installing Ubuntu.
After installation is complete, click Launch.
Create a new Linux username and password. That’s it! You are currently on the Linux command line.
Method 3: Cygwin
PowerShell has greatly improved the Windows command-line tools, but Linux has had a more practical terminal for a long time. Here’s how to use Cygwin, a ‘nix-style terminal for Windows PCs, to get the best of both worlds.
Step 1: Install Cygwin
Download the normal setup.exe from here then proceed with installation.
Click Next to continue with Setup
Step 2: Choose the Installation Type
Choose if you want to download Cygwin from the internet or install it from your computer.
Click your preferred choice and click Next
Step 3: Choose Installation Directory
Choose where you’d like to install Cygwin
Step 4: Choose the Local Directory
Select the package directory where you will download the installation files.
Browse to select Local Package Directory and click Next
Step 5: Choose Download Site
Continue to the Download mirror selection. Unfortunately, the installer doesn’t specify where the mirrors are, so you’re usually better off assuming which mirror will work.
Pick any of the available Download Sites
After choosing a mirror, the installer downloads a list of the available packages for you to install. You can also search for a certain package to filter the results. Click Next and wait for a few minutes to complete the installation.
A Cygwin icon will appear on your desktop after the installation, which you can click to access the Cygwin terminal.
To function in your standard Windows command prompt, you must include Cygwin in your Windows Environment Variables.
Follow these steps to add Cygwin to your Windows Environment Variables.
Step 1: Go to Advanced Settings
On your computer’s taskbar, search for Advanced Settings.
Step 2: Click Environment variables
Clicking Environment variables will take you to edit the variables.
Step 3: Edit the Variables
Locate the Environment Variable and click Edit
Add the Cygwin bin location as shown below at the end of the variable value option.
;C:\Cygwin\bin
Remember to separate it from other values with a semicolon. Click OK to close the window.
Now you can open the command prompt and enter Linux commands.
Ported Programs
Popular Linux apps have been ported to Windows, and their compiled versions are accessible online. There’s a strong possibility you’ll find a version of the application that has been transferred to Windows if you Google the name of the program and “Windows” to run it on Windows.
Final Thoughts
The options above are all good, depending on your needs. Users of a few essential shell utilities might choose Cygwin, while those who want the complete Linux experience might opt for a virtual machine. Others who only wish to run a specific program could decide to use a Windows-compatible version of that program.
Up Next
- Linux vs. ChromeOSComplete Guide to Windows ServerBest Linux Distro for AMD Processors