Reprinted from: Baidu Experience
Windwos 10 's Anniversary update provides developers with a big new feature: A complete, Ubuntu-based bash Shell that runs Linux software directly on Windows. This makes it possible for the Linux subsystem to be used with Windows 10.
Method/Step
- Make sure that you are using at least version 14316 of Windows 10. This method applies only to the 64-bit version of Windows 10.
Open Settings app and head Update and Security > for development. Start the "developer Mode" switch here to make the developer mode.
- Next, open Control Panel, click Programs, and then click Open Windows features on or off in programs and features. Enable the options in the Windows Subsystem for Linux (Beta) list here, and click OK.
After you do this, you are prompted to restart the computer. Click "Restart Now" to restart your computer and Windows 10 will install the new feature.
- After your computer restarts, click the Start button (or press the Windows key), type Bash, and then press ENTER.
- The first time you run the Bash.exe file, you are prompted to accept the terms of service. Then the command will download bash on Ubuntu from Windows Store on Windows.
- How to use Ubuntu's bash shell and install Linux software
You now have the full command line based on Ubuntu for the bash shell. Because they are the same binaries, you can use Ubuntu's apt-get command to install Ubuntu software
To open the Bash shell, just open the Start menu, search for bash or Ubuntu and you'll see a "bash on the Ubuntu on Windows app." You can put shortcuts to this app in your Start menu, taskbar, or Desktop for easy use.
- Use the Linux terminal commands that you will use. If you use a standard Windows command prompt with DOS commands, here are two bash and some basic commands in Windows
- You need to use the Apt-get command to install and update the software in the Ubuntu environment.
How to install and use the Bash shell for Linux in Windows 10