HomeComputerLinuxHow to Run Linux (Including Ubuntu) On Windows

How to Run Linux (Including Ubuntu) On Windows

Wondering whether you should switch to Linux? These days, you don’t have to give up Windows to use Linux. In fact, you can run Linux on Windows without using a Virtual Machine. Thanks to recent developments and Microsoft’s newfound love for open source software.

Here is how you can actually run Linux apps on Windows as well as a full Linux desktop on Windows.

Run Linux on Windows Using a Virtual Machine

One of the most popular ways to run an OS on another is by creating a virtual machine. So obviously you can run Linux on Windows by creating a Linux Virtual Machine. For this though you’ll need a few things.


Related: 10 Popular Windows Apps for Linux Users

Create Linux Virtual Machine

  1. Start VirtualBox and click on the New button. Create a Linux virtual machine
  2. Give your Virtual Machine any name you want.
  3. Select Linux from the Type drop-down menu. Name virtual machine
  4. In the Version drop-down menu, select the best option. In this case, we’re going to use Ubuntu (64bit). Hence, that’s the most suitable option.
  5. Click Next.
  6. Use the slider to allocate RAM to your virtual machine. For Linux, 2048MB or 2GB is quite enough. Allocate RAM to virtual machine
  7. Click Next.
  8. You now have to create a Virtual disk on which you can install your OS. Click Create with the default option, Create a virtual hard disk now, selected. Create virtual hard disk to install Linux
  9. On the next page, click Next again without changing the default option.
  10. You’ll then have to decide between a Dynamic or Fixed size for your virtual disk. Select one and click Next.
    • Dynamic: The size of the virtual disk depends on your usage. If you’re only using 6GB out of 20GB on your virtual machine, it will only use 6GB on your actual hard drive. The size can also increase if more storage is required as per your usage.
    • Fix: The size of the virtual disk is fixed and will not expand or contract based on your usage.
  11. Use the slider to allocate the size of the virtual disk and click Create.

Related: i7 Best Linux Desktop Environments to Enrich Your Experience.​​​

Run Linux on Windows

Now that your virtual machine is ready, you can install your preferred Linux distro on it.

  1. Right click on the newly created virtual machine on the left and select Start > Normal. Right-click virtual machine
  2. In the new popup window, click on the browse button and select an OS image. In this case, it’s Ubuntu 18.10. Select OS image
  3. Click Start. Ubuntu Linux on Windows

The virtual machine will then boot using the provided OS image. You’ll have to go through the installation set up to install the OS on the virtual machine. Once you get past that, you can run Linux anytime using the same process, i.e., Right-click on it and select > Start > Normal. You only have to provide the OS image file at first boot.

As you can see in the screenshot above, we are running Ubuntu on Windows in VirtualBox.

Run Linux on Windows Using Windows Subsystem for Linux

The 2018 Fall Creators Update for Windows 10 introduced the Windows Subsystem for Linux. Basically, it lets you install the Linux backend on your Windows machine without having to use a virtual machine. This brings all the useful command line tools available for Linux onto Windows. In the process, it negates the need to install Linux in Virtual Box or dual boot for many who only prefer Linux because of the powerful command line.


Windows Subsystem for Linux requirements

  • For this to work, you need to make sure your system is compatible. Go to Settings > System > About. Here, look for the System type entry. For you to be able to install and run Linux on Windows, this should read 64-bit operating system.
  • Also, make sure you’re running Windows 10 build 14393 or later. You can verify this under Windows specifications on the same About page. Check for OS build.

Install Windows Subsystem for Linux

  1. Press the Window button and type “turn windows features on or off.”
  2. You should find the Turn Windows Features on or off option even before you can finish typing the entire search term. search for turn windows features on or off
  3. Click on it to open it. Windows Subsystem for Linux
  4. Scroll down the list and check the box next to Windows Subsystem for Linux.
  5. Click OK. Reboot PC
  6. Windows will install the necessary files. When it’s done, click Restart now.

Install Linux on Windows

With Windows Subsystem for Linux installed, you can now easily search for and install a Linux distribution from the Microsoft Store.

  1. Launch the Microsoft Store from the Start Menu. launch Microsoft Store
  2. Click on the search button in the top right and search for “Linux.” This will show you all the available Linux distributions on the Microsoft Store. Linux on Windows Store
  3. Select any and click Get > Install. For demonstration, we’re going with Ubuntu 18.04. Ubuntu on Windows Store
  4. Launch the program once installed to finish the final installation.

Depending on your internet speed, and the size of the Linux distro, the installation can take little to quite some time.

Run Linux on Windows

You can launch your installed Linux distro like any other program or app from the Start menu. Alternatively, you can also search for and run bash. On the first launch, it will finish installing a few more necessities and then you’ll be able to set your user name and password.

Ubuntu on Windows

Update Linux

Before you start using it, make sure your installed Linux version is up to date. Different Linux distributions have different commands for this so you’ll probably have to google it. For Ubuntu, just run the following commands one by one in bash.

sudo apt update
sudo apt upgrade

You’ll be asked to enter your password when you run a sudo command.

Install Linux apps on Windows

There are a lot of things you can do with the command line on Linux including downloading things, unzipping zip files, and a lot more. But not everyone is a developer or so comfortable with using the command line. If you want to have some fun, or if there are some Linux only programs you might want to run, you can do that too.

To run Linux apps on Windows though, you’ll need to install an X server. An X server lets you access a Linux application or desktop environment’s graphic user interface (GUI). There are many other X Servers you can install but let’s just stick with this one for this tutorial: VcXsrv Windows X Server utility.

Download the exe file and install it like any other desktop program. Once that’s installed, you can go ahead and install any Linux app.

On Linux, everything can be installed or uninstalled from the command line. So you just have to know which command to run to install things. Now, this isn’t a Linux tutorial so we won’t be diving into that. But you can generally find install commands for most Linux apps on the app’s website or development page.

For example, you can install Rhythmbox on Windows which is a great user-friendly offline music player.

  1. For this, you just have to run the command below.
    sudo apt install rhythmbox
  2. Enter your password when asked.
  3. After this, instruct Linux to display the app’s GUI through the X server.
    export DISPLAY=:0
  4. Run the XLaunch utility that gets installed when you install the VcXsrv Windows X server utility. vcxsrv X server utility
  5. Select One large window or One large window without titlebar.
  6. Click Next and select Start no client to ensure that it only starts the server.
  7. Click Next > Next and then click Finish, leaving all the default options as it is. You might want to Save configuration though. vcxsrv setup complete
  8. This will open a blank window on your computer.
  9. Now you can run Rhythmbox by simply entering the name into the command line.

    Rhythmbox on Windows

You can run any Linux apps on Windows using the process demonstrated above. You’d have to set the display command each time you run any Linux apps on Windows.

Install a full-featured Linux Desktop on Windows

Yes, you can even install a full-blown Linux desktop right on top of Windows. It’s really not an ideal solution if you want to use a Linux desktop. Apps are fine but this is a bit of an overkill. However, there are reasons why you might want to. If you’re contemplating switching to Linux for instance, you can have a general idea of what you might be diving into. Plus it’s also fun so if you’re into that, why not?

Make sure you have an X server installed first and that Linux is up to date. You can install any Linux desktop you want just like with apps. In this example, we’ll use KDE Plasma because it’s my favorite, but it’s also really heavy on resources so keep that in mind. We’re only going to install the desktop environment and none of the apps it comes with because this is just a demonstration.

  1. Run the command below to install the KDE Plasma desktop environment. Installation can take quite a lot of time because there are a lot of packages to install.
    sudo apt-get install kde-plasma-desktop
  2. Now, instruct Linux to display the desktop through your X server.
    export DISPLAY=:0
  3. Launch the X server as before.
  4. Run KDE Plasma by entering the command below in the bash shell.

And there you have it, a Linux desktop on Windows because this is 2019. If you’re new to Linux and don’t know which desktop to install, you can see a list of some of the popular ones here.

That’s how you can run Linux on Windows

Linux is a really great alternative to Windows, and actually much better for programmers and developers. There are a number of things that Linux gets right and Windows doesn’t. But Windows does have its own advantages and a major one is the compatibility with GPUs made by Nvidia and AMD. That also makes Windows a popular gaming platform, something Linux seriously lacks.

So despite Linux being really great as a desktop OS especially for certain people, most people would still want to stick with the familiarity of Windows. Luckily for them, they can now run Linux on Windows when they need or want, using either of the methods above.

Disclosure: Mashtips is supported by its audience. As an Amazon Associate I earn from qualifying purchases.


Please enter your comment!
Please enter your name here

You May Like

More From Author