Home‎ > ‎

Windows 10 Bash

The initial version of this page is written for anyone that is picking up Windows 10 Bash after the Anniversary Update.


Getting Started with Windows 10 Bash

Enabling Windows 10 Bash

  1. Go to Settings > Update & security > For developers, and choose Developer mode. 
  2. In the Search box search for Windows feature "Turn Windows features on or off."
  3. Select "Windows Subsystem for Linux", and have windows add the feature.
  4. Launch a command prompt (CMD) with Admin privileges and type bash. This will start getting the bash from the repo.
  5. Now there is a new item call bash in windows!  In the start menu it is called "Bash on Ubuntu on Windows"

Superuser or Root Privileges

    The issue seem to have been resolved in the more recent builds, and "sudo [command]" seems to work.
    Although you may be using a windows Administrator account, it doesn't seem like if your account will be a Super User by default.  To do anything with Superuser privileges, you will need to do two things:
    1. Switch to the root user in bash by executing "sudo su"
    2. With the root user run the commands with superuser privileges by using "sudo [command]"
    3. When done, type exit to return to your user account.

    Initial Updating of Packages

    After the initial installation of bash, many of the packages in the subsystem may be out of date and in need of an update.  apt-get as in Ubuntu is the utility to update the packages, however there is a known bug that you may have to get around, try the steps below, but if apt-get fails with the error "Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory.", try the workaround and retry


    1. Use superuser privileges (see Superuser or Root Privileges section)
      • "sudo su"
    2. Update the list of packages "sudo apt-get -y update"
    3. Upgrade all of the packages "sudo apt-get -y upgrade"

    Workaround fix for Unable to connect to Upstream:

    You will need to add two lines to policy-rc.d and do some linkage.  Run the following commands with superuser privileges:

    cat > /usr/sbin/policy-rc.d <<EOF
    #!/bin/sh
    exit 101
    EOF
    chmod +x /usr/sbin/policy-rc.d
    dpkg-divert --local --rename --add /sbin/initctl
    ln -s /bin/true /sbin/initctl


    Fix Font Rendering issue

    The default installation may have a font that will cause rendering issues when symbols are to be displayed on the screen.  This was first noted when running node package manager (npm).

    Garbled symbols in Windows 10 Bash

    To fix this, you will need to change the font for the console.
    1. Go to the console properties, but clicking on the Ubuntu logo in the title bar of the console window, and pick properties.
      Windows 10 Bash Console Properties
    2. Go to the Font tab
    3. Change "Raster Fonts" to a different font like Courier New.  You may also want to adjust the font size to a different size.  In my case Size 18 worked the best.


    Setup for Node.JS Development

    Follow the steps in the following two pages: