Ubuntu 16.04 via Windows Subsystem for Linux is available to Windows users (Build >= 16215 / Fall 2017 Creators Update) via the Windows Store.
Install Windows Subsystem for Linux from Windows Store
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.
- reboot PC
- go into Windows Store and install Ubuntu.
- a “Bash on Ubuntu on Windows” icon is created, perhaps pin it to your Start Menu for convenience.
You can also 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 WSL terminal
- capitalization matters
- you must include the
.exeat the end.
How to Reinstall Windows Subsystem for Linux
from Windows Command Prompt (this deletes the WSL filesystem, backup your WSL files first!)
Then reinstall the Ubuntu WSL app by typing at Command Prompt
List which WSL distros you have installed
You can install multiple WSL distros, and can list them and switch which is default for
bash from Command Prompt
WSL Beta users should upgrade to Ubuntu Windows Store app
If you have the “beta” WSL already installed, the new Ubuntu Windows Store app installs side-by-side. It is recommended to transition to the new Ubuntu app as the beta WSL will be deprecated.
Uninstall the beta WSL app after you’ve transferred your files by from Windows Command Prompt:
especially if you’ve just upgraded to a new Windows Build, be sure that under #2 above, Windows Subsystem for Linux (beta) is still checked. If it was checked, uncheck it, reboot, and check it again, then try to reinstall WSL again.