How to install or reinstall Windows Subsystem for Linux


Ubuntu 18.04 is available on the Microsoft Windows Store.


  1. enable Linux by typing in Administrator Powershell:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Alternatively, you can do this via the GUI by Start → Turn Windows features on or off → Windows Subsystem for Linux. 2. reboot PC 3. go into Windows Store and install Ubuntu. 4. an “Ubuntu” icon is created, perhaps pin it to your Start Menu for convenience.

Or, start Ubuntu by typing in Windows Command Prompt:



Run Ubuntu apps from Windows Command Prompt

From Windows Command Prompt

bash -c "ls -l"

Run Windows program from Ubuntu app

From Ubuntu terminal

  • capitalization matters
  • you must include the .exe at the end.

Reinstall Ubuntu

  1. copy off your Linux user files (the next step deletes them).
  2. Command Prompt:

    Ubuntu clean
  3. Command Prompt:


List installed Windows Linux distros

Install, list, and switch between Linux distros on Windows default for bash by from Command Prompt:



  • Microsoft’s official Ubuntu Windows app install procedure.

Error: 0x80040154

If you’ve just upgraded to a new Windows Build, be sure that Start → Turn Windows features on or off → Windows Subsystem for Linux is still checked.