How to Install Bash on Windows 10

Use the Linux command line in Windows

Bash in the Linux subsystem for Windows

okubax / Flickr / CC by 2.0

If you know how to install bash on Windows 10, you can run the Linux command line from within Windows. That way, you can use Linux commands to navigate the file system, create directories with the mkdir command, move files with the mv command, and edit files using Nano.

Instructions in this article apply to the 64-bit version of Windows 10.

What You Need to Install Bash on Windows

To run bash, your computer needs to be running a 64-bit version of Windows with a version number no lower than 14393, so update Windows 10 to the latest version before you begin. In order to run the Linux shell, you need to turn on Windows developer mode and enable the Linux subsystem.

How to Turn on Windows Developer Mode

To enable developer functions for Windows:

  1. Right-click the Start menu and select Settings.

    Right-click the Start menu and select Settings.
  2. Select Update & Security.

    Select Update & Security.
  3. Select For developers on the left side.

    Select For Developers on the left side.
  4. Select Developer mode.

    Select Developer mode.
  5. Select Yes to confirm, then wait for the developer package to install.

    Select Yes to turn on developer mode
  6. Type Windows Features in the desktop search bar and select Turn Windows Features On Or Off.

    Type Windows Features in the desktop search bar and select Turn Windows Features On Or Off.
  7. Check the box beside Windows Subsystem For Linux and select OK.

    Check the box beside Windows Subsystem For Linux and select OK.
  8. Select Restart now to reboot your computer to apply the changes.

    Select Restart now to reboot your computer.

How to Use Bash in Windows

After your computer reboots, you're ready to set up bash for Windows:

  1. Go to the Ubuntu for Windows page in the Microsoft Store and select Get.

    Go to the Ubuntu for Windows page in the Microsoft Store and select Get.
  2. Wait for the app to finish downloading, then select Launch.

    Wait for the app to finish downloading, then select Launch.
  3. Wait for Ubuntu to finish installing, then create a username in the command window and press Enter.

    Wait for Ubuntu to finish installing, then create a username in the command window and press Enter.
  4. Create a password and press Enter.

    Create a password and press Enter.

    For security, the characters you type will not appear on the screen. You will be prompted to reenter the password to confirm.

  5. After the installation is successful, close the window and right-click the Start menu, then select Windows PowerShell (Admin).

    right-click the Start menu, then select Windows PowerShell (Admin).

    You may be prompted to enter your Windows administrator password.

  6. Type bash in the terminal window and press Enter.

    Type bash in the terminal window and press Enter.

You now have a core version of Ubuntu installed on your system without any graphical desktops or subsystem. Therefore, you can now use Linux commands to communicate with the Windows file structure. Anytime you want to run the Linux command line, open the PowerShell or the command prompt and enter bash.

You can also search for bash in the search bar and choose to open bash in a command window.