How To Use Bash Shell Natively On Windows 10
Bash has been one of the most well-known feature of Linux distributions, which due to its flexibility as well as ease of usage, made it popular among programmers. The Windows’ operating system’s command line interface, cmd.exe, on the other hand, lacked various capabilities of it’s Linux counterpart.
Microsoft, therefore, in their Anniversary Update, added several features to the Windows 10 OS, with bash being one of them. To install and use it on Windows 10, one need to perform the following steps :
- Start -> Settings -> Update&Security. Under the ‘Use Developer Features’, select ‘Developer mode’.
- Selecting the developer mode will pop the following alert. Click yes, and let the computer restart.
- Go to Control Panel -> Programs and Features -> Turn Windows Features On and Off. In the window that appears, check the ‘Windows Subsystem for Linux’ option, and click OK.
- This will trigger an alert asking for the system to be restarted to complete the installation of the required components. After the restart is complete, go to the command prompt, and type ‘bash’. Follow the instructions that appear to install bash from Windows store. After it is installed, it will be required to create a UNIX username. After completing the installation, exit the prompt.
- To access the shell, simply type ‘bash’ in the Windows command prompt, and everything is good to go.
Note that bash runs natively on Windows 10, which is different from using emulators like ‘cygwin’ for Windows which enabled GNU tools to run on unsupported Windows environment. Also, Linux subsystem for Windows 10 is only available on the 64-bit version of the OS.My Personal Notes arrow_drop_up