Microsoft announced the ability to run native Bash and GNU/Linux command-line tools directly on the new Windows Subsystem. If you are a developer and you want to Install Linux Bash Shell on Windows 10 then instead of using third-party software like Cygwin or Babun, you can enable ‘Linux Subsystem for Windows’ and use Ubuntu Application on your Windows 10 computer. Here this post we discuss how to configure ubuntu bash on windows 10.
This Feature is only valid for users running Windows 10. You can’t enable this feature in previous Windows versions like Windows 7, Windows 8 or Windows 8.1. If you want to install Linux Bash Shell on any of those Windows versions then I would recommend you to install Cygwin on your computer.
This feature was added in Insider Preview build 14316, It’s also only for 64-bit versions of Windows 10.
Installing ubuntu bash on windows 10
To enable or install ubuntu bash on windows 10 first click on the start menu and select settings. Now click on Update & security and click on for Developers. Select Radio Button Developer mode.
This will popup a message :
Turning on Developer mode including installing and running apps from outside the windows store, could expose your device and personal data to security risks or harm your device. Turn on developer mode? click yes to enable. close the window.
Also Read : Developer mode package failed to install Error
Enable Bash Feature
Now move to the start menu, Type “Turn Windows Features on or off”: Click turn windows features on or off this will open windows features window. Now Scroll down and check the “Windows Subsystem for Linux (Beta)” feature: As shown below image
Click ok this will take some time to download and install the feature. After this, it will prompt to restart windows.
Click restart to take effect the changes.
Configure Bash on windows 10
Once your computer is restarted go to Start Menu and search ‘bash.’ Bash will show up.
Click on it to start Linux Bash Shell. It will ask you to accept terms and conditions. Press ‘y’ on your keyboard to accept the terms and conditions. Or you can open PowerShell/command prompt and run “Bash” and follow the simple prompts to accept Canonical’s license and kick-off the download of the Ubuntu image. It will start download from Microsoft store. wait untill complete download.
After the download has completed, it will take some time to extract and install then you will see a message installation successful. enter a unix use name and then set a password as shown picture below.
you’ll be able to start “Bash on Ubuntu on Windows” from the Start menu:
here are a few basic commands on both Bash and Windows:
Change Directory: cd in Bash, cd or chdir in DOS
List Contents of Directory: ls in Bash, dir in DOS
Move or Rename a File: mv in Bash, move and rename in DOS
Copy a File: cp in Bash, copy in DOS
Delete a File: rm in Bash, del or erase in DOS
Create a Directory: mkdir in Bash, mkdir in DOS
Use a Text Editor: vi or nano in Bash, edit in DOS