How to Enable or Disable Windows Subsystem for Linux WSL in Windows 10
The Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.
See also:
- What is the Windows Subsystem for Linux? | Microsoft Docs
- Windows Subsystem for Linux Installation Guide for Windows 10 | Microsoft Docs
- Comparing WSL 2 and WSL 1 | Microsoft Docs
- Frequently Asked Questions about Windows Subsystem for Linux | Microsoft Docs
- Command Reference for Windows Subsystem for Linux | Microsoft Docs
- Troubleshooting Windows Subsystem for Linux | Microsoft Docs
This tutorial will show you how to enable or disable the Windows Subsystem for Linux (WSL) feature in Windows 10.
Contents
- Option One: Enable "Windows Subsystem for Linux" (WSL) in Windows Features
- Option Two: Disable "Windows Subsystem for Linux" (WSL) in Windows Features
- Option Three: Enable "Windows Subsystem for Linux" (WSL) in PowerShell
- Option Four: Disable "Windows Subsystem for Linux" (WSL) in PowerShell
1 Open Windows Features, turn on (check) Windows Subsystem for Linux, and click/tap on OK. (see screenshot below)
2 Click/tap on Restart Now when ready to restart the computer to apply. (see screenshot below)
3 If you want to update to WSL 2, then continue at step 3 here.
4 If you only want to use WSL 1 (not WSL 2), you can now install and setup WSL distro apps from the Microsoft Store.
1 Open Windows Features, turn off (uncheck) Windows Subsystem for Linux, and click/tap on OK. (see screenshot below)
2 Click/tap on Restart Now when ready to restart the computer to apply. (see screenshot below)
1 Open an elevated PowerShell.
2 Copy and paste the command below into the elevated PowerShell, and press Enter. (see screenshot below)
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
3 If you want to update to WSL 2, then continue at step 3 here.
4 If you only want to use WSL 1 (not WSL 2), Restart the computer to apply, and install and setup WSL distro apps from the Microsoft Store.
1 Open an elevated PowerShell.
2 Copy and paste the command below into the elevated PowerShell, and press Enter. (see screenshot below step 3)
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3 When prompted to restart the computer, type Y, and press Enter when ready to do so. (see screenshot below)
That's it,
Shawn
Related Tutorials
- How to Update from WSL to WSL 2 in Windows 10
- How to Install Windows Subsystem for Linux (WSL) Distros in Windows 10
- How to Set Linux Distribution version to WSL 1 or WSL 2 in Windows 10
- How to Update and Upgrade Windows Subsystem for Linux (WSL) Distro Packages in Windows 10
- How to Unregister and Reset Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Add User to Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Remove User from Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Add, Remove, and List Sudo Users in Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to List Users in Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Set Default User for Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Switch User in Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Change User Password in Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Reset User Password in Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Create a Bash on Ubuntu on Windows 10 shortcut
- How to Add 'Open Bash window here' context menu in Windows 10
- How to Add 'Open Bash window here as administrator' context menu in Windows 10
- How to Enable or Disable Extended Line Endings in Notepad in Windows 10
- How to Add or Remove Open Linux shell here context menu in Windows 10
- How to use Hyper-V Quick Create and pre-installed Ubuntu virtual hard disk to setup Ubuntu Linux virtual machine
- How to Export and Import Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to List All Available Windows Subsystem for Linux (WSL) Distros in Windows 10
- How to List All Running Windows Subsystem for Linux (WSL) Distros in Windows 10
- How to Terminate Running Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Set Default Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Run a Windows Subsystem for Linux (WSL) Distro in Windows 10
- How to Access Linux Files in a Windows Subsystem for Linux (WSL) Distro from Windows 10
- How to add a desktop experience to a Windows Subsystem for Linux distro