Windows Subsystem for Linux
lastmod 2026-10-01created 2019-04-1025 edits
A feature supported since Windows 10 that lets you install Linux on Windows.
Categories
- wslconfig - location of the
~/.wslconfigfile.
Check
Installation
Check that Vitualization Technology is enabled in the BIOS settings, and
in Turn Windows features on or off, check "Windows Subsystem for Linux" and "Virtual Machine Platform".
Or run the following from the command line:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Rebooting the computer is required.
At this point, proceed with #Installing a distribution.
If it still doesn't work, try enabling the Hyper-V feature:
Rebooting the computer is required.
Installing with wsl.exe
If you just type wsl:
zer0@DESKTOP-11F854J C:\Users\zer0>wsl
Linux용 Windows 하위 시스템 설치되어 있지 않습니다. 'wsl.exe --install'을 실행하여 설치할 수 있습니다.
자세한 내용은 https://aka.ms/wslinstall
참조하세요.
Linux용 Windows 하위 시스템 설치하려면 아무 키나 누르세요.
CTRL-C 누르거나 이 창을 닫아 취소하세요.
이 프롬프트는 60초 후 시간이 초과됩니다.
작업이 중단되었습니다.
If you type wsl --install:
zer0@DESKTOP-11F854J C:\Users\zer0>wsl --install
다운로드 중: Linux용 Windows 하위 시스템 2.6.2
설치 중: Linux용 Windows 하위 시스템 2.6.2
Linux용 Windows 하위 시스템 2.6.2이(가) 설치되었습니다.
Windows 선택적 구성 요소 설치 중: VirtualMachinePlatform
배포 이미지 서비스 및 관리 도구
버전: 10.0.26100.5074
이미지 버전: 10.0.26200.7462
기능을 사용하도록 설정하는 중
[==========================100.0%==========================]
작업을 완료했습니다.
요청한 작업이 잘 실행되었습니다. 시스템을 다시 시작하면 변경 사항이 적용됩니다.
Since Korean: 배포 이미지 서비스 및 관리 도구 (Deployment Image Servicing and Management) is printed partway through, it seems to run dism.exe as a subprocess.
Now restart the system.
Installing a distribution
This command enables the features needed to run WSL and install a Linux distribution such as Ubuntu.
To install Ubuntu 24.04:
Listing distributions
Connecting to a specific distribution
Connect to WSL2 Ubuntu:
Setting WSL2 as the default version
Set the default version to 2:
How to check the version assigned to each distribution:
Set a specific distribution to version 2:
Shutting down WSL
Root directory
When installing ubuntu, check the path below.
C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
Going open source
Microsoft announced that it has made all of WSL open source, which is also an answer to "Will this be open source?", the very first issue in the Microsoft/WSL repository
- You can download the source from Microsoft/WSL on GitHub and build it yourself, add features, or fix bugs
- The released code covers the command-line tools, the service, the Linux daemons, and even the Plan9-based file sharing server
- WSL consists of a Windows-side executable part and several components running inside a Linux virtual machine (VM)
- CLI tools: wsl.exe, wslconfig.exe, wslg.exe
- WSL service: wslservice.exe, responsible for booting the VM, running distributions, file sharing, etc.
- Linux daemons: init, gns, localhost, etc., handling networking and port forwarding
- Plan9 server: handles file sharing between Windows and Linux
- WSLg: graphics environment components supporting Wayland and X servers
- WSL2-Linux-Kernel: Linux kernel source
- Lxcore.sys: the core driver of WSL1
- P9rdr.sys, p9np.dll: the file redirection system that supports the \wsl.localhost path in Windows
Background of the open-source move and history of WSL
- WSL was first announced at BUILD in 2016 and shipped in the Windows 10 Anniversary Update
- WSL1 was built on lxcore.sys, which handled Linux syscalls inside the Windows kernel
- WSL2 was first announced in 2019 and improved compatibility and features by using a real Linux kernel
- It then grew with added features such as GPU support, running GUI apps (wslg), and systemd support
- Since 2021 it has been delivered through the Microsoft Store as a standalone package separate from Windows
- The first release was 0.47.1 (preview); later, 1.0.0 in 2022 extended support to Windows 10
- wsl.exe was kept to support the transition for users
WSL2
Troubleshooting
WslRegisterDistribution failed with error: 0x800701bc
- (Windows) ubuntu20.04 installation error 0x800701bc
- Manual installation steps for older versions of WSL | Microsoft Learn
WslRegisterDistribution failed with error: 0x800701bc
Error: 0x800701bc WSL 2? ?? ?? ????? ?????. ??? ??? https://aka.ms/wsl2kernel? ????? .
Downloading the linux kernel update package fixes the problem. Go here, download the update, and install it.
Then set WSL 2 as the default version
WslRegisterDistribution failed with error: 0x80370102
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...
Check that Vitualization Technology is enabled in the BIOS settings.
If you use Virtual Box, also check the "Nested Virtualization" items:
- Enable VT-x/AMD-V
- Enable Nested Paging
Check that hypervisor launch is enabled in the boot configuration. You can verify this by running powershell with administrator privileges.
If you see "hypervisorlaunchtype Off", the hypervisor is disabled. To enable it, run the following in powershell with administrator privileges.
See also
- Windows
- dism - Deployment Image Servicing and Management
- bcdedit - Boot Configuration Data store editor
- NSL - WSL for Linux
Favorite site
- Github - microsoft/WSL
- Install the Windows Subsystem for Linux
- DirectX is coming to the Windows Subsystem for Linux
- FA Q about Windows Subsystem for Linux | Microsoft Learn