Create & Run Bash Scripts in Windows 10

Microsoft trying to influence the Linux environment, recently move their dice in their Anniversary Update by bringing the possibility to run Bash Script in windows 10. With the great improvements and changes, Linux Bash shell is integrated for developers in Windows 10.

Do not get confused. It is not Linux in Windows. It is just a command line tool that supports Linux commands.

Although Windows 10 supports Bash script, it is not delivered by default. You should install it. In this guide, I will show you how to install the Bash shell command-line tool on your PC.

Before installing Bash shell, be sure that you are running 64-Bit Windows Version & at least Windows 10 Anniversary Update. Let’s begin installing the Bash Shell.

Open Settings and search for Developer.

Windows 10 Developer Features

Under “Use developer features”, select the Developer mode.

Enabling Developer Mode in Windows 10

Click YES to turn on developer mode.

Enabling Developer Mode in Windows 10

This will install the required package and windows restart is compulsory before enabling Bash Shell on windows 10.

Assuming that all the installation goes successful and PC is restarted, start RUN window and type appwiz.cpl .

Click on Turn Windows features on or off  & select Windows Subsystem for Linux.

Enabling windows Subsystem for Linux

After the installation, restart your PC and search for bash.exe and press Enter.

Bash Shell

Then create a default UNIX user ( admin not allowed ). Enter the username & close the command bash.exe.

Now you can open the Bash tool from the Start menu like you would with any other app.

Bash scripts on Win 10

Please do not expect that all the Linux command will work in this shell. This shell has still some limitations and I hope that Microsoft will fix them in their upcoming versions.

ENJOY LINUX ! ENJOY WINDOWS !! ENJOY SCRIPTING !!!

mm

Anup Chhetri

IT system administrator

You may also like...

error: Content is protected !!