Enable windows subsystem for linux bị mất wifi
Skip to main content This browser is no longer supported. Show
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Troubleshooting Windows Subsystem for Linux
In this articleWe have covered some common troubleshooting scenarios associated with WSL below, but please consider searching the issues filed in the WSL product repo on GitHub as well. File an issue, bug report, feature requestThe WSL product repo issues enables you to:
You can also:
Installation issues
Note In my case, the LocalState folder for my Ubuntu 18.04 distribution was located at C:\Users Check WSL Docs GitHub thread #4103 where this issue is being tracked for updated information.
Common issuesI'm on Windows 10 version 1903 and I still do not see options for WSL 2This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking 'Check for Updates' to install the latest updates on your system. See the full instructions on taking the backport. If you hit 'Check for Updates' and still do not receive the update you can install KB KB4566116 manually. Error: 0x1bc when wsl --set-default-version 2This may happen when 'Display Language' or 'System Locale' setting is not English.
The actual error for
For more information, please refer to issue 5749 Cannot access WSL files from WindowsA 9p
protocol file server provides the service on the Linux side to allow Windows to access the Linux file system. If you cannot access WSL using To check this, you can check the start up logs using:
Please see this Github thread for further discussion on this issue. Can't start WSL 2 distribution and only see 'WSL 2' in outputIf your display language is not English, then it is possible you are seeing a truncated version of an error text.
To resolve this issue, please visit command not found when executing windows .exe in linuxUsers can run Windows executables like notepad.exe directly from Linux. Sometimes, you may hit "command not found" like below:
If there are no win32 paths in your $PATH, interop isn't going to find the .exe. You can verify it by running Here is a an example that /etc/profile on Debian contributed to the problem:
The correct way on Debian is to remove above lines. You may also append $PATH during the assignment like below, but this lead to some other problems with WSL and VSCode..
For more information, see issue 5296 and issue 5779. "Error: 0x80370102 The virtual machine could not be started because a required feature is not installed."Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
Learn more about how to Configure Nested Virtualization when running Hyper-V in a Virtual Machine. WSL has no network connection on my work machine or in an Enterpise environmentBusiness or Enterprise environments may have Windows Defender Firewall settings configured to block unauthorized network traffic. If local rule merging is set to "No" then WSL networking will not work by default, and your administrator will need to add a firewall rule to allow it. You can confirm local rule merging's setting by following these steps:
You can find instructions on how to change this Firewall setting in Enterprise environment: Set up WSL for your company. WSL has no network connectivity once connected to a VPNIf after connecting to a VPN on Windows, bash loses network connectivity, try this workaround from within bash. This workaround will allow you to manually override the DNS resolution through
Once you have disconnected the VPN, you will have to revert the changes to
Starting WSL or installing a distribution returns an error codeFollow these instructions to collect detailed logs and file an issue on our GitHub. Updating WSLThere are two components of Windows Subsystem for Linux that can require updating.
Apt-get upgrade errorsSome packages use features that we haven't implemented yet. To fix issues related to
"Error: 0x80040306" on installationThis has to do with the fact that we do not support legacy console. To turn off legacy console:
"Error: 0x80040154" after Windows updateThe Windows Subsystem for Linux feature may be disabled during a Windows update. If this happens the Windows feature must be re-enabled. Instructions for enabling the Windows Subsystem for Linux can be found in the Manual Installation Guide. Changing the display languageWSL install will try to automatically change the Ubuntu locale to match the locale of your Windows install. If you do not want this behavior you can run this command to change the Ubuntu locale after install completes. You will have to relaunch bash.exe for this change to take effect. The below example changes to locale to en-US:
Installation issues after Windows system restore
No internet access in WSLSome users have reported issues with specific firewall applications blocking internet access in WSL. The firewalls reported are:
In some cases turning off the firewall allows for access. In some cases simply having the firewall installed looks to block access. If you are using Microsoft Defender Firewall, unchecking "Blocks all incoming connections, including those in the list of allowed apps." allows for access. Permission Denied error when using pingFor Windows Anniversary Update, version 1607, administrator privileges in Windows are required to run ping in WSL. To run ping, run Bash on Ubuntu on Windows as an administrator, or run bash.exe from a CMD/PowerShell prompt with administrator privileges. For later versions of Windows, Build 14926+, administrator privileges are no longer required. Bash is hungIf while working with bash, you find that bash is hung (or deadlocked) and not responding to inputs, help us diagnose the issue by collecting and reporting a memory dump. Note that these steps will crash your system. Do not do this if you are not comfortable with that or save your work prior to doing this. To collect a memory dump
Check your build numberTo find your PC's architecture and Windows build number, open Look for the OS Build and System Type fields. To find your Windows Server build number, run the following in PowerShell:
Confirm WSL is enabledYou can confirm that the Windows Subsystem for Linux is enabled by running the following in an elevated PowerShell window:
OpenSSH-Server connection issuesTrying to connect your SSH server is failed with the following error: "Connection closed by 127.0.0.1 port 22".
If you do see such messages and the keys are missing under
"The referenced assembly could not be found." when enabling the WSL optional featureThis error is related to being in a bad install state. Please complete the following steps to try and fix this issue:
Correct (SSH related) permission errorsIf you're seeing this error:
To fix this, append the following to the the
Please note that adding this command will include metadata and modify the file permissions on the Windows files seen from WSL. Please see the File System Permissions for more information. Running Windows commands fails inside a distributionSome distributions
available in Microsoft Store are yet not fully compatible to run Windows commands out of the box. If you get an error
Unable to boot after installing WSL 2We are aware of an issue affecting users where they are unable to boot after installing WSL 2. While we fully diagnose those issue, users have reported that changing the buffer size or installing the right drivers can help address this. Please view this Github issue to see the latest updates on this issue. WSL 2 errors when ICS is disabledInternet Connection Sharing (ICS) is a required component of WSL 2. The ICS service is used by the Host Network Service (HNS) to create the underlying virtual network which WSL 2 relies on for NAT, DNS, DHCP, and host connection sharing. Disabling the ICS service (SharedAccess) or disabling ICS through group policy will prevent the WSL HNS network from being created. This will result in failures when creating a new WSL version 2 image, and the following error when trying to convert a version 1 image to version 2.
Systems that require WSL 2 should leave the ICS service (SharedAccess) in it's default start state, Manual (Trigger Start), and any policy that disables ICS should be overwritten or removed. While disabling the ICS service will break WSL 2, and we do not recommend disabling ICS, portions of ICS can be disabled using these instructionsng-application-guard-) Using older versions of Windows and WSLThere are several differences to note if you're running an older version of Windows and WSL, like the Windows 10 Creators Update (Oct 2017, Build 16299) or Anniversary Update (Aug 2016, Build 14393). We recommend that you update to the latest Windows version, but if that's not possible, we have outlined some of the differences below. Interoperability command differences:
Uninstall legacy version of WSLIf you originally installed WSL on a version of Windows 10 prior
to Creators update (Oct 2017, Build 16299), we recommend that you migrate any necessary files, data, etc. from the older Linux distribution you installed, to a newer distribution installed via the Microsoft Store. To remove the legacy distribution from your machine, run the following from a Command Line or PowerShell instance: FeedbackSubmit and view feedback for |