Bash, originally built for Linux, is an interpreter that processes shell commands. A shell, also known as Command-Line, takes commands in plain text format and calls operating system services to perform a task. With the existence of built-in PowerShell on Windows 10, you may wonder why we need to install Linux Bash on windows 10 (Linux shell). Linux has native support for Bash, so when open-source developers decide to benefit from the Linux environment on Windows they need to take extra steps.
For removing these barriers and as though you are using a native Linux shell, we require you to install Linux Bash on Windows 10. Developers used to resort to a bunch of techniques to exploit the Linux Command Line on Windows. Using Virtual Machines, Cygwin, and PuTTY were so common but they were also problematic on occasion.
Get yourself an efficient Windows 10 VPS for remote desktop, at the cheapest price out there. FREE Windows 10 running on NVMe SSD storage and high-speed internet.
Check Out Windows 10 VPS PlansWhat happens when you install bash on Windows 10?
When you have a Bash installed on your Windows 10, the complete Linux system is integrated into your Microsoft Windows 10 and the drawbacks of emulators do not apply anymore. As a result, developers would not have to make some related compromises when adopting open source programming languages. That’s huge news for Microsoft Windows 10 community because the users can do pretty much anything you could do inside of a Linux terminal.
Once you install Linux Bash on Windows 10 it will simply look like another application on your Desktop. The only difference would be the absence of Linux Kernel compared to running Bash from Linux operating system. We recommend you to follow us to the end to learn how to install Linux Bash on Windows 10.
Note: Bash is only installable on 64-bit Windows 10 and it is incompatible with the 32-bit version.
Install Linux Bash on Windows 10
In this article, I aim to accompany you step by step until you have running Linux Bash on your Windows 10. But hold on a moment! Which distro of Linux is better for Windows users? I recommend Ubuntu as there are good reasons such as being highly customizable, tons of Ubuntu flavors, its security and so many more advantages to support my choice. Additionally, Ubuntu is one of the most popular Linux distros.
Therefore, I will instruct you on how to install the Ubuntu distro on your Windows 10. The installation process is the same for SUSE Linux and a couple of other Linux distros so you may use the guideline for them as well. Without further ado, let’s install Linux Bash on Windows 10. Two steps are involved: Enabling Windows Subsystem for Linux and installing a distro of Linux.
Step 1: Enable Windows Subsystem for Linux (WSL) feature
Before you install Linux Bash on Windows 10, the ‘Windows Subsystem for Linux’ feature has to be enabled.
Type “Turn Windows features on or off” in your Windows 10 search box. From there, click on Open.
Now enable “Virtual Machine Platform” and “Windows Subsystem for Linux”. These two features are essential for the functionality of your Linux Bash on Windows 10, and on occasion, they are not set so make sure you have them checked before anything.
Also, you may want to use the “Windows PowerShell” tool to enable Windows Subsystem for Linux. Similarly to do that, find the tool from the search box and select “Run as Administrator”.
Then pass in the following command and enter:
Enable-WindowsOptionalFeature –Online –FeatureName Microsoft-windows-subsystem-linux
Wait for probably a few seconds. You must be displayed the below window.
To complete the operation, you are asked to reboot your computer to let the change take effect. Pass in Y and press enter. Done! Your system must be prepared for the next step of the Linux Bash installation on your Windows 10.
Step 2: Download a Linux Distro from Microsoft Store
After restarting your computer, you may open Microsoft Store and Search/download Ubuntu.
Choose Ubuntu 20.04 LTS, which is the latest version, and simply install and launch the Linux.
Note: if you happen to close the Microsoft Store launch page by accident after the installation, you may search Ubuntu from the Windows search box and launch it from there.
Note: Please make sure that Ubuntu 20.04 LTS is being installed on the system drive which is a C drive by default. If that’s not the case, change the directory to the system drive. In light of that, WSL, which only runs in the system drive, will be able to build the necessary foundation for Ubuntu to work properly.
Following that, you will be displayed in this window.
As it appears on the window, the installation could take a few minutes but no worries this is a one-time installation process. The installed Linux will be a subsystem of Windows 10 so it is different than a virtual (Linux Bash) OS on Windows 10. Later, the following window will appear:
In this cmd-like window, you will be allowed to choose your username and password, and after setting them, something like this will be shown to you.
So you may type in ‘clear’ to clear the page. At this point, the installation of Linux Bash on Windows 10 is complete. Congrats!
Note: As an alternative to opening Bash as a Windows 10 application, you may open Bash on Windows 10 by typing Bash in Windows Command Prompt. Also from there, you may quit Bash and return to Windows mode by typing in the exit. Thus, you know from where and how to run the Linux terminal on Windows.
Step 3: Bash on older versions of Windows 10
Although it is always recommended to catch up with the latest Windows updates, if for some reason you are using an old version of Windows 10, you do have to enable Windows Developer Mode. You may find that option under Settings/For Developers/Developer Mode. In case the ‘Developer Mode’ option is not there, Windows 10 is updated enough to handle the installation procedure explained earlier in this paper.
Reliable, high-performance RDP servers with 99.95 uptime. Take your desktop on the go to all the major cities in the US, Europe, and Asia.
Get an RDP ServerStep 4: Upgrade Windows Subsystem for Linux (WSL)
In previous sections, we enabled the Virtual Machine Platform feature. Please look back and make sure you have done so as taking this measure is necessary for upgrading WSL.
Also Read: Introducing the Windows Subsystem for Linux!
Now open PowerShell via Run as Administrator. After that, pass in the following command to upgrade WSL1 to WSL2.
ws1 - -set-default-version 2
The process is usually completed within sometime between 5 to 10 minutes. Later on, you may test if the WSL is successfully upgraded by executing the following command.
ws1 -1 -v
Conclusion
Obviously, Linux and Windows are naturally two different operating systems, and their native shells, Bash and PowerShell, offer their own exclusive advantages over the other for open source developers. Therefore, it would be great to have both PowerShell and Bash perfectly functional on one operating system.
Microsoft has recently enabled Linux developers to experience Linux shells on Windows 10. For that to be realized, Microsoft has built a foundation called Windows Subsystem for Linux (WSL) to allow the users to have a Linux terminal for Windows and enjoy its capabilities.
Get yourself an efficient Windows 10 VPS for remote desktop, at the cheapest price out there. FREE Windows 10 running on NVMe SSD storage and high-speed internet.
Check Out Windows 10 VPS PlansIn this article, we walked you through the necessary steps to install Linux Bash on Windows 10. By following us to this point, not only you have found out how to get a Linux terminal on Windows but also you know how to run a Linux terminal on Windows. Furthermore, to successfully install Linux Bash on older versions of Windows 10, you are required to enable Windows Developer Mode.
We also explained how to upgrade Windows Subsystem for Linux (WSL) as the new version provides better supports for the latest distros of Linux available on Microsoft Store. We recommend you install Linux Bash on Windows 10 as it is almost identical to being able to use Bash on its native operating system. In case you are certain you do not need to use Bash anymore, you may easily undo all the aforementioned steps, and delete the application and disable the associated features.
0 Comment