How to Install Linux on Windows 10 (Using Bash Shell)
Brief: This beginner’s tutorial shows you how to install Linux on Windows 10
Back in 2016, Linux on Windows 10 became a reality for Microsoft’s Operating System. All thanks to the partnership between Microsoft & Canonical.
The arrival of Bash shell allowed developers access to various Linux binaries on Windows, without switching or virtualizing a Linux environment.
In this Windows 10 guide, I’ll show you the action steps to successfully install Linux on Windows 10 using Bash Shell and also I’ll answer some related FAQ’s, but before that, let me share some technical information.
Also Read: How to Install Windows 10 in Vmware
Microsoft made it a big deal (partnership with Canonical) when it announced support for Linux Bash on Windows 10 with version 1607, additionally called the Anniversary Update.
Earlier, Linux Bash on Windows 10 was not available to everyone immediately. Users had to install the Windows 10 technical preview to install Linux on Windows 10.
But now, things have changed and it’s a lot easier than before. Before we go on installing Linux Bash on Windows 10, let me tell you a little more about it.
What is Linux Bash on Windows?
Let’s learn more about Linux Bash
Before we tend to get all the way down to the business of Installing Linux (Bash) on Windows 10, it’s vital to understand what specifically you’re handling here.
Microsoft developed a Linux compatible kernel interface for WSL for users by which they can run a GNU userland on top of it.
That’s because the underlying OS kernel for Linux isn’t accessible here. The Bash shell permits the user to run the same binaries that you would run on Linux Operating System.
It’s Designed primarily as a (best) tool for developers working on open source projects.
Summing it up, Linux Bash on Windows provides a Windows subsystem and Ubuntu Linux runs atop it.
It’s not an application nor a virtual machine, it’s simply a complete Linux system inside Windows 10.
Windows 10 Bash Shell
Know more about Windows 10 Bash Shell
As I mentioned earlier, Microsoft initially made a partnership with Canonical to offer a full Ubuntu-based Bash shell environment to run on top of this subsystem.
Since then, support for OpenSUSE, SUSE Linux Enterprise Server, Debian as well as Kali Linux is there for users that have more specific needs.
The Fall Creators Update moved the installation process for Linux distributions to the Windows Store.
And on March 26, Microsoft enabled custom Linux distributions on Windows 10 by open-sourcing a sample for distribution maintainers that allows them to submit their distros to the Microsoft Store just like any other Windows 10 app.
Worth a mention that WSL does have some limitations.
For starter, it’s only available on the 64-bit versions of Windows 10, and this compatibility layer included in all x64 releases of the Operating Systems from Windows 10 version 1607 and later.
The feature itself is not perfect either, as it does not run 32-bit binaries of Linux software or applications that require unimplemented Linux kernel services. In fact, not every command-line application works.
All that said, Microsoft continues to refine and optimize this key Windows 10 feature for developers.
Now, let me show you the action steps to install Linux on Windows 10…
How to Install Linux on Windows 10
The Methos to install Linux on Windows 10
Installing Linux on Windows is not difficult, but installing it without proper steps and methods can make things complicated. I know 2 methods by which you can install Linux on Windows 10.
- Method 1: Install Linux on Windows 10 (Newer Updated versions)
- Method 2: Install Linux on Windows 10 (Older versions)
Let’s go through the steps for both methods one by one.
Method 1: Install Linux on Windows 10 (Newer versions)
If you have an updated version of Windows, then installing a Bash shell is easier as Fall Creators Update makes things super easy to Install Bash on Windows 10.
It’s just one click away. You can get it from Windows 10 store. Before that, you need to follow Step no.1
Note: I am installing Ubuntu using Windows 10 Linux subsystem. You can also use SUSE Linux. The procedure is the same for both distributions.
Step 1: Enable “Windows Subsystem for Linux” feature
The first thing you need to do is to enable Windows Subsystem for Linux feature. There are 2 ways to do this.
Enable it using “Powershell“
Go to the Start menu and search for PowerShell. Run it as an administrator.
Once you have the PowerShell running, use the command below to enable Bash in Windows 10.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You’ll be asked to confirm your choice. Type Y or press enter:
Now you should be asked to reboot. Even if you are not asked to, you must restart your system.
Enable it using the “Windows Feature” option
- Open Settings.
- Click on Apps.
- Click on Apps & features.
- Under “Related settings,” on the right side, click the Programs and Features link.
5. Click the Turn Windows features on or off link.
6. On “Windows Features,” check the Windows Subsystem for Linux option.
- Click OK.
- Click Restart now.
Step 2: Download a Linux system from the Windows store
Once your system has rebooted, go to the Windows Store and search for “Linux.”
Now Install any of the Linux distribution, simply click on the Get or Install button.
Do you know? You can even install multiple Linux distributions this way, and each will get its different shortcuts in Windows 10. It is also possible to run multiple ones at the same time.
If you’re unsure of which Linux distribution to install, Ubuntu is community’s as well as my recommendation.
Do note, the download size of files is around 1GB, so you need a good internet connection to get the app within minutes.
Step 3: Run & Test Linux inside Windows 10
Once you have installed Linux, it’s time to see how to access Bash in Windows 10. Just search for the Linux distribution you installed in the previous step. I’ll search for Ubuntu as I have installed Ubuntu for this tutorial.
It will take some time installing and then you’ll have to set up the username and password.
In some cases, this installation takes a little longer period. Don’t worry, it’s just for the first run. Bash shell will be available for use directly from the next time onwards.
Now, Enjoy Linux inside Windows 10. I have shared some commands at the bottom of this tutorial. If you are interested, go ahead and try some commands.
Troubleshoot 1: The WSL optional component is not enabled. Please enable it and try again.
You may see an error like this when you try to run Linux inside Windows 10:
The WSL optional component is not enabled. Please enable it and try again. See https://aka.ms/wslinstall for details. Error: 0x8007007e Press any key to continue…
And if you press any key, the application closes immediately. The reason here is that the Windows Subsystem for Linux is not enabled in your case.
You should enable it as explained in step 1 of this guide. You can do that even after you have installed Linux from Windows Store. Scroll up & follow the Step no. 1.
Troubleshoot 2: Installation failed with error 0x80070003
This is because the Windows Subsystem for Linux only runs on the system drive i.e. the C drive.
You should make sure that when you download Linux from the Windows Store, it is stored and installed in the C Drive. Now follow these steps.
- Go to Settings.
- Now select Storage.
- More Storage Settings.
- Change where new content is saved and select C Drive here.
Method 2: Install Linux on Windows 10 (Old version)
Even though if you cannot get the Fall Creator’s update on Windows 10 for any reason, you can still install Linux, if you have the Anniversary update of Windows 10.
But in this case, you’ll have to enable the developer mode. How to do that? Let’s see in method no. 2.
Step 1: Activate the Developer Mode
Press Windows Key + I to access Windows 10 System settings. Now, go to Update & Security. From the left side pane, choose For Developers You’ll get an option for “Developer mode.” Now, Enable it.
Step 2: Enable the “Windows Subsystem for Linux”
Go to the Control Panel > Programs. Now, click “Turn Windows Features on or Off” under Programs and Features.
Enable the “Windows Subsystem for Linux” option in the list here and click “OK.” To apply the changes you will need to Restart your system.
Step 3: Installing Bash Ubuntu on Windows
After rebooting your computer, click the start button and search for “bash”. The first time you run the bash.exe file, it will prompt you to accept the terms of service.
After that, you’ll be given the option to download and install Ubuntu. You’ll be asked to create a username and password during this process.
It will install an entire Ubuntu Linux system, so have patience as it will take some time in downloading (depends on your internet speed) and installing Linux on Windows.
Once this is done, go back to the Start menu and search for Ubuntu or Bash.
Now you have a command-line version of Ubuntu Linux in your Windows. Let me share some of the command lines & similarities between CMD, Bash & Dos.
A Guide to Using the Bash Shell
Now, you have a full command-line bash. If you are well familiar with using the Bash shell on other platforms like Linux and macOS, you’ll feel right at home here.
And if this is your first time with this, then you will find that it is effortless to pick and play, with the Linux terminal sharing many similar commands with DOS, or Windows Command Prompt.
Here’s a table that lists these common commands between the two:
|Create a Directory||mkdir||mkdir|
|Change Directory||cd||cd or cdir|
|Remove a Directory||rmdir||rd|
|Copy a file||cp||copy|
|Delete a file||rm||del or erase|
|Move a file||mv||move|
|Use a text editor||vi or nano||edit|
|List contents in a directory||ls||dir|
Remember that you’re not limited in Linux, you are free to do anything you want. Also, why to install just one version of Linux? When we can take the benefit of all.
If you want, you can also install all three, including Fedora Linux when it becomes available in the Store, and run them all simultaneously as per your needs.
What can you do with a bash shell on windows?
- You would be able to use standard Linux SSH utility and discard third-party tools like putty.
- You will be able to edit text with VIM from the command line and manipulate text using Sed and Awk.
- You can also, apt-get to manage their packages and to install tens of thousands of Ubuntu binaries.
- Basically it’s the best utility for developers/administrators. These may not be very useful to general users. But if you are interested in learning Linux you can start it from here.
Anyways, there’s a lot you can do with Linux. It’s all upon you, if you are a beginner then I would suggest you to join the “itsfoss” community, where you can learn a lot about Linux.
Visit: Itsfoss website
Linux on Windows Frequently Asked Questions (FAQs)
Users who are just starting out with such Linux features on Windows, tend to ask many questions related to Linux on Windows, as they don’t have much knowledge about the topic.
So I have decided to create this FAQ section & answer some of the FAQs so that, you can understand things better and have no doubts.
(1) How do I install Linux on Windows 10?
Is it possible? Yes, it’s possible to install Linux on Windows 10. Installation of Linux on Windows 10 differs a little for Windows with old version & Windows with Fall Creators Update.
First, you need to enable the Windows Subsystem for Linux feature in Windows Feature & then Install Ubuntu or any Linux distribution from Microsoft Store.
For Old users, first, you need to activate the developer mode and then follow the same steps i.e Enable the Linux feature in Windows Feature & then Install Ubuntu.
I have provided a detailed guide above for both Windows 10 users.
(2) How do I install Linux on my computer?
Installing Linux on Windows is different from installing Linux on your computer. Here are the steps to install Linux on your computer.
Download the Linux distribution of your choice (Ubuntu is recommended), next Boot into the Live CD or Live USB. Now Start the installation process (Configure basic options)
Create a username and password (Needed to perform administrative tasks)
Set up the disk partition, Boot into Linux & Start Using Linux.
(3) Can I install Ubuntu on Windows 10?
Yes, you can install Ubuntu on Windows 10. First, you need to enable the Windows Subsystem for Linux feature in Windows Feature & then you can Install Ubuntu or any Linux distribution from Microsoft Store simply by clicking on the Install button.
(4) Does windows 10 have Linux?
Yes, it does have a Linux feature. Windows 10 Is Getting a Built-in Linux Kernel.
Microsoft recently announced Windows Subsystem for Linux version 2—that’s WSL 2. It will feature “dramatic file system performance increases” and support for Docker. To make all this possible, Windows 10 will have a Linux kernel.
(5) How Do I enable WSL?
First, Open the Settings app, Now go to Apps -> Apps & Features.
Next, Go to Programs and Features link, On the left, click the Turn Windows features on or off link.
The dialog Windows Features will appear on the screen, On “Windows Features,” check the Windows Subsystem for Linux option, Now Click Ok & then Restart your computer.
(6) Can I run Ubuntu on Windows 10?
Yes, users can install Ubuntu and run atop of it. You just need to Install the Ubuntu app from Microsoft store, then set up the Ubuntu in-order to make it run.
(7) Can I use Linux and Windows on the same computer?
Yes, it’s possible. There are 2 ways to use Linux & Windows on the same computer.
One is using a dual boot option and another is installing Linux inside Windows. Linux can be run from a USB drive without modifying your existing system. Installing a Linux distribution alongside Windows as a “dual boot” system will give you a choice of either operating system each time you start your PC, which is preferred over option 2.
(8) Can I have Ubuntu and Windows on the same computer?
Yes, one can run both Ubuntu and Windows on the same computer but not at the same time.
There are 2 possible ways to do it. One is using a dual boot option and another is installing Linux inside Windows.
That’s all, from this guide. I hope, you found this tutorial helpful for installing Linux on Windows 10. It lets you play with Linux inside of Windows.
If you have questions or suggestions, first read the FAQs, your question may be already answered and if not then feel free to ask them in the comments section.
Here, you can check out more useful guides and resources:
- How to take Backup + Reset your Cox Password
- What is Vulkan Run time Libraries and Do we need it?
- Best Microsoft Active Directory Alternatives
- How to Repair Windows 10 Registry
- 21+ Awesome Windows 10 Tips and Tricks
Here are a few more…
- How to Fix Google Chrome not Working
- How to Enable Remote Assistance on Windows 10
- How to Send Remote Assistance Invitation
- How to Install Linux on Windows 10
- How to Enable and Install Hyper-V on Windows 10
- How to Install Windows 10 in Vmware workstation