Linux users were overjoyed when it became known that the Bash shell would be coming to Windows. While it wasn’t available to all users at first, the Windows 10 Creators Update made Linux more accessible on Windows.
Want to join in the fun? This is how you can install Linux on Windows operating system without using a virtual machine.
Bash definition
Bash is basically a subsystem for Ubuntu. With Bash, you have a Linux system running inside Windows. This is the same Bash you find on Linux. You can use it to execute Linux commands without the need for a virtual machine or dual boot.
Using the Bash shell, developers can work with Linux directly from the Windows computer.
Enable Linux on Windows
There are two ways to enable Windows Subsystem for Linux. One is through PowerShell and the other is through Windows Components.
Use PowerShell
Use PowerShell
Find PowerShell and run it as administrator. Once opened, type this command and hit Enter after:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You will be prompted to confirm by pressing Y or N. Press Y to continue, then restart your computer. If it is already installed, you do not need to restart.
Use Windows Features
Use Windows features
Use search to find a Control Panel application called Turn Windows Features On or Off.
Note. You can also navigate to the app by going directly to Control Panel Programs Programs and Features Turn Windows features on or off.
Once opened, browse through the feature list until you find Windows Subsystem for Linux. Check the box to enable the option.
The computer will start up and make some changes. After that, you will be prompted to restart your computer.
Download Linux Distro
Windows should now be able to run Linux. Now you need to download a Linux distribution like Ubuntu for Windows in order to enter Linux commands.
Just go to the Microsoft Store and download any Linux distribution of your choice. You need to be logged in to continue.
There are several systems available, but we’ll install Ubuntu and use it for the rest of this post. The download will likely take some time due to the large file size.
Run Linux
The Linux system you have installed will run like a regular Windows application. Open Ubuntu. It will perform a one-time installation. You will be able to use Ubuntu Linux faster the next time you open the application.
After installation, you will be prompted for a username and password. Provide all required information.
From now on you will be able to browse the directory just like in Linux. You will need to use SUDO APT to execute root commands. You can also use APT-GET, APT INSTALL and APT UPDATE. You are almost free to do whatever you can do in the Linux terminal.
Remember that the Windows file system will be inside the MNT folder.
If you want to edit Windows files from a Linux system, you will need to enter CD MNT, do LS, then enter CD C and another LS to find all the files stored in Windows. Enjoy Linux with Windows 10!