How to install Bash shell command-line tool on Windows 10

Before trying to install the Bash shell on Windows 10, there are a few prerequisites. First and foremost, you need to be running the Windows 10 Anniversary Update on your machine. If you're not, you can use our guide to get the update on your device.
The second requirement is to be running the 64-bit version of Windows 10. If you're running a 32-bit version of the operating system, you can use this guide to move to the 64-bit version.
To install Bash shell on your Windows 10 PC, do the following:
  1. Open Settings.
  2. Click on Update & security.
  3. Click on For Developers.
  4. Under "Use developer features", select the Developer mode option to setup the environment to install Bash.
  5. On the message box, click Yes to turn on developer mode.
  6. After the necessary components install, you'll need to restart your computer.
  7. Once your computer reboots, open Control Panel.
  8. Click on Programs.
  9. Click on Turn Windows features on or off.
  10. Check the Windows Subsystem for Linux (beta) option.
  11. Click OK.
  12. Once the components installed on your computer, click the Restart now button to complete the task.
After your computer restarts, you will notice that Bash will not appear in the "Recently added" list of apps, this is because Bash isn't actually installed yet. Now that you have setup the necessary components, use the following steps to complete the installation of Bash:
  1. Open Start, do a search for bash.exe, and press Enter.
  2. On the command prompt, type y and press Enter to download and install Bash from the Windows Store.
  3. Then you'll need to create a default UNIX user account. This account doesn't have to be the same as your Windows account. Enter the username in the required field and press Enter (you can't use the username "admin").
  4. Close the "bash.exe" command prompt.
Now that you completed the installation and setup, you can open the Bash tool from the Start menu like you would with any other app.
It's important to note that unlike the real Bash shell you'll find in Linux, the version of the command line utility has some limitations with Windows.
For example, the Windows Subsystem for Linux wasn't designed to run Linux graphical applications (e.g. KDE, Gnome, etc.) on Windows 10. The tool is only to offer developers a text-based command-line feature to run Bash and core Linux tools within the operating system.
In addition, while Linux applications can access the system files and pretty much everything on your main drive, you can't launch or use scripts on Windows programs.
Finally, remember that Microsoft is releasing this feature with the "beta" label on it, which means that it's still a work in progress, not every intended feature is included, and sometimes it may not work correctly.
With the Windows 10 Anniversary Update, Microsoft is focusing on core functionalities, including:
  • Bash environment to run tools like awk, sed, and grep.
  • Basic features for languages, such as NodeJS / npm, Python, Perl, Git.
  • Command line editor, including vi, emacs, and ssh.
  • Linux user support.
  • Symlink support.
  • Ability to run apt and apt-get for updates and package testing.
  • Ability to mount local a local hard drive using /mnt

Comments

Popular posts from this blog

How to Choose a Technology Stack for Web Application Development

[Advance Java] Difference Between Apache and Tomcat

Setting ESLint on a React Typescript project