Background
I’ve been using wsl
(version 2) with genie
mod for years without issue, but one day, Windows 10 finally catch up on wsl
Windows 11 features and gives us a way to use systemD
natively.
I wanted to use the new «right way» to enable systemD
on Windows Subsystem for Linux (without genie
), and I also had a (probably related) infinite Windows RemoteApp error poping in.
Fixing it
A — Uninstall wsl and related stuff
- In powershell (as admin)
# list all installed distros wsl -l -v # destroy distros wsl --unregister Ubuntu wsl --unregister Debian # and so on
- In Settings > Apps > Apps & Features
- search for
Ubuntu
(thenDebian
, etc), and if something is found, click on uninstall - search for
Linux
, and if something is found, click on uninstall on all results
- In Start Menu > Turn Windows Features on or off
- Untick
Virtual Machine Platform
checkbox - Untick
Windows Subsystem for Linux
checkbox
- Reboot
- I might have reboot between step 2) and 3) as well.
B — Re-install and configure wsl to use systemD
The process of installing wsl have become super straightforward.
- Installing wsl — In powershell (as admin)
# install wsl wsl --install
Then reboot and wait for the Ubundu installation to complete and ask for username (it might takes some time).
- Optional: Changing distribution — In powershell (as admin)
# list available distributions wsl --list --online # install favorite distro wsl --install -d Debian # set Debian as default wsl --set-default Debian
NB: wsl --set-default-version 2
is not needed anymore.
- Enabling systemD support — Inside wsl
- Launch your distribution
- Edit
/etc/wsl.conf
(or create the file if it doesn’t exist)
[boot] systemd=true # Optional: remove windows from PATH (autocompletion) [interop] appendWindowsPath = false
- Clean rebooting — In powershell (as admin)
# clean shutdown wsl --shutdown
Great success! 🎉 You have now enabled systemD
in wsl
natively. You can test it with sudo systemctl status time-sync.target
(inside your Linux distribution).
Let me know if I missed anything, I’ll be glad to update this gist.
-
Home
-
News
- How to Uninstall WSL on Windows 11 & Windows 10? See a Guide!
By Vera | Follow |
Last Updated
If you need to uninstall Windows Subsystem for Linux, you can do this task on Windows 10/11. It is not simple as program uninstallation. Refer to this post from MiniTool and find the guide on how to uninstall WSL easily.
About WSL
Windows Subsystem for Linux, also known as WSL, is a feature in Windows operating system that is primarily designed for developers, especially web developers. WSL enables you to run a Linux system with Linux command-line tools and GUI apps on Windows 11/10. This won’t break anything important on your PC.
In the earlier time, Microsoft released the first version – Windows Subsystem for Linux (WSL) that supports a direct translation between Linux and Windows. While WSL2 uses a lightweight virtual machine to integrate it into your Windows workflow. Any Linux distribution can run on either the WSL 1 or WSL 2 architecture, which depends on their configuration.
To run a Linux system on Windows 10/11, you need to install WSL and here a related post is helpful – How to Install Windows Subsystem for Linux (WSL) on Windows 11.
When anything goes wrong or you no longer need to use this platform, you may want to uninstall WSL. Well then, can you uninstall WSL from your computer? It is possible and just follow the guide below now.
How to Uninstall WSL on Windows 10/11
How to uninstall WSL on Windows 11/10? It is not easy to completely remove WSL from your PC since this isn’t similar to uninstalling a program. You need to do three steps – delete the Linux distro, uninstall other components and disable this platform. Do the operations about WSL uninstall Ubuntu in order:
Step 1: Uninstall Linux Distro
1. In Windows 11/10, press Win + I at the same time to open Settings.
2. Go to Apps > Apps & features.
3. Choose a Linux distribution like Ubuntu and click Uninstall (Windows 10). For Windows 11, click the three dots and click Uninstall. Then, click Uninstall again to confirm the operation.
Tips:
You can type the Linux distribution like Ubuntu into the text of App list to find your installation.
Step 2: Delete Windows Subsystem for Linux Components
After uninstalling the Linux distribution from Windows 11/10, other elements of the Windows Subsystem for Linux functionality should be also removed.
1. In the Settings window, go to App > Apps & features.
2. Choose Windows Subsystem for Linux WSLg Preview and click Uninstall > Uninstall. In Windows 11, you need to click three dots and click Uninstall.
3. Find Windows Subsystem for Linux Update and uninstall it.
Step 3: Disable Windows Subsystem for Linux
This is the last step you should do and see what you should do:
1. In Windows 11, click Apps > Optional features and click More Windows features under the Related settings section to open the Windows Features In Windows 10, navigate to Apps > Apps & features > Option features > More Windows features.
Tips:
Alternatively, you can type windows features into the search box and click Turn Windows features on or off.
2. In the Windows Features interface, locate Virtual Machine Platform and Windows Subsystem for Linux, then uncheck the boxes of these two options.
3. Click OK to save the changes and restart your computer.
After the restart, you completely uninstall WSL on Windows 11/10. If you change your mind and want to run a Linux distribution like Ubuntu, you can still reinstall WSL on your computer.
About The Author
Position: Columnist
Vera is an editor of the MiniTool Team since 2016 who has more than 7 years’ writing experiences in the field of technical articles. Her articles mainly focus on disk & partition management, PC data recovery, video conversion, as well as PC backup & restore, helping users to solve some errors and issues when using their computers. In her spare times, she likes shopping, playing games and reading some articles.
Понравилось? Поделитесь…
Устали от WSL? Вы нашли альтернативу? Избавьтесь от этого с помощью этого руководства.
Если вам не нужна подсистема Windows для Linux на вашем компьютере, вы можете удалить ее. Однако этот процесс может включать больше, чем просто нажатие кнопки удаления в настройках Windows. Это не сложно, но важно удалять файлы в правильном порядке.
Вот шаги, которые необходимо выполнить, чтобы полностью удалить WSL с вашего ПК с Windows.
Зачем удалять подсистему Windows для Linux?
WSL — это очень удобный инструмент, который позволяет вам легко запускать дистрибутивы Linux в виртуальной среде на вашем компьютере с Windows. Хотя это не оказывает большого влияния на хранилище, нет необходимости устанавливать его, если вы не заинтересованы в использовании Linux.
Существуют также хорошие альтернативы WSL для запуска Linux, и вы можете использовать одну из них вместо решения Microsoft. Вам не только не понадобится WSL, но и существует небольшой риск конфликта между подсистемой Windows и вашим альтернативным выбором.
Удалите все установленные дистрибутивы Linux в Windows
Этот шаг подойдет не всем, но если вы установили какие-либо дистрибутивы Linux, вам следует сначала удалить их. Это помогает гарантировать, что удаление WSL не оставит на вашем компьютере никаких файлов, связанных с установками Linux.
- Вы можете найти дистрибутивы Linux, которые вы установили, в списке других установленных приложений в разделе «Настройки» > «Приложения» > «Установленные приложения».
- Удалите каждый из дистрибутивов Linux, таких как Ubuntu, так же, как и любое другое приложение Windows.
Если ваш компьютер пришел к вам с уже установленными программами, вы можете не знать, что такое дистрибутив Linux, а что нет. Вот некоторые из наиболее распространенных дистрибутивов Linux, но вы также можете просто поискать в Google название программы, в которой вы не уверены.
После удаления всех версий Linux вы можете перейти к следующему шагу процесса.
После удаления всех версий Linux вы можете удалить приложение WSL и его компоненты. Как и в предыдущем шаге, вы можете удалить WSL, как и любую другую программу.
Перейдите в «Настройки» > «Приложения» > «Приложения и функции». Прокрутите вниз список приложений, чтобы найти подсистему Windows для Linux. Нажмите кнопку «Дополнительно» и выберите «Удалить». В Windows 10 щелкните имя приложения, затем нажмите «Удалить».
Если вы видите какие-либо дополнительные компоненты WSL, такие как WSL Update или WSLg Preview, удалите их таким же образом.
Удалите WSL и платформу виртуальной машины
Заключительной частью процесса является удаление основных файлов WSL и отключение параметра на панели дополнительных функций Windows.
- откройте панель «Функции Windows», выбрав «Настройки» > «Приложения» > «Дополнительные функции» > «Дополнительные функции Windows». Вы также можете выполнить поиск функций Windows и нажать «Включить или отключить функции Windows.
- Прокрутите список функций вниз, чтобы найти и снять флажок «Подсистема Windows для Linux.
- Если вам не нужно запускать другие виртуальные среды, вы также можете снять флажок «Платформа виртуальной машины.
- Нажмите OK, а затем перезагрузите компьютер.
Теперь WSL должен быть полностью удален с вашего компьютера. Он не будет получать автоматические обновления, и вы не сможете с ним никак взаимодействовать. Если вам это понадобится в будущем, узнайте, как установить WSL через Microsoft Store на ПК с Windows.
Удаление WSL с вашего ПК с Windows
Вы можете установить WSL на свой компьютер с Windows с помощью одной команды. Удалить его, если он вам больше не нужен на вашем компьютере, не так просто. Выполнив три простых шага, описанных здесь, вы можете убедиться, что все файлы и компоненты WSL удалены.
On Windows 10, you can uninstall the Windows Subsystem for Linux 2 (WSL2) when you no longer need to use the platform, and in this guide, you will learn how to complete the task. WSL2 is the second version of Microsoft’s integration to run Linux on Windows 10 using a lightweight virtual machine instead of a direct translation between Linux and Windows available with the first version.
As a result of this change, you now get an actual Linux kernel with a solution that improves performance and app compatibility while maintaining the same experience as the original version of WSL. (See also the video tutorial to complete this task on the Pureinfotech YouTube channel.)
Although the ability to run Linux on Windows 10 is a useful feature for developers and users who need access to both operating systems, it might come a time when you no longer need the platform, or you may need to reset it to fix problems.
Whatever the reason, you can permanently remove WSL2 by uninstalling all the components or resetting distros individually if they are causing issues.
This guide will teach you the steps to completely remove the WSL2 integration on Windows 10.
The uninstall process of the Windows Subsystem for Linux 2 requires multiple steps, including removing the distro, kernel update, and other components.
Step one: Uninstall Linux distros from WSL2
To uninstall a distro of Linux on Windows 10, use these steps:
-
Open Settings on Windows 10.
-
Click on Apps.
-
Click on Apps & features.
-
Select the distribution of Linux and click the Uninstall button.
-
Click the Uninstall button again.
Once you complete the steps, you may need to repeat the steps to continue removing additional distros as required.
Step two: Uninstall Windows Subsystem for Linux update
To uninstall the WSL 2 Linux kernel update, use these steps:
-
Open Settings.
-
Click on Apps.
-
Click on Apps & features.
-
Select the “Windows Subsystem for Linux update” item and click the Uninstall button.
-
Click the Uninstall button again.
After you complete the steps, you can remove the remaining components.
Step three: Uninstall WSL2 components
To disable the Windows Subsystem for Linux components, use these steps:
-
Open Settings.
-
Click on Apps.
-
Click on Apps & features.
-
Under the “Related settings” section, click the “Programs and Features” option from the right side.
-
Click the “Turn Windows features on or off” option.
-
Clear the “Virtual Machine Platform” option.
-
Clear the “Windows Subsystem for Linux” option.
-
Click the OK button.
-
Click the Restart now button.
Once you complete the steps, the Windows Subsystem for Linux will be completely uninstalled from Windows 10.
If you change your mind, you can always set up the environment again with these instructions.
We may earn commission for purchases using our links to help keep offering the free content. Privacy policy info.
All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.
I was fooling around a bit with the Linux/Bash subsystem for Win10.
But then I decided to stay with Cygwin for now. So I uninstalled it — or thought I did.
Now I’ve installed Cygwin and put its bin
directory first in the PATH
.
In cmd.exe
, when I type bash
, it will start the Cygwin’s Bash.
But when I do Win+R and type bash
, I still get the prompt:
Windows Subsystem for Linux has no installed distributions.
…bla-bla-bla…
How do I get rid of the Linux/Bash subsystem entirely, so it will instead pick up Cygwin’s Bash from the PATH
?
robinCTS
4,3274 gold badges20 silver badges29 bronze badges
asked Apr 27, 2018 at 21:54
3
If your OS has been upgraded to the Fall Creators Update, you should be able to issue the command wslconfig
.
You could of course try uninstalling first by using the command lxrun /uninstall /full
.
If its still there, you can try unregistering the distro:
-
First you need to know which distro is installed by using
wslconfig /l
-
From the list choose the distro (e.g. Ubuntu) you want to uninstall and type the command
wslconfig /u Ubuntu
robinCTS
4,3274 gold badges20 silver badges29 bronze badges
answered Jul 10, 2018 at 1:30
Casey SVCasey SV
7391 gold badge5 silver badges4 bronze badges
3
In order to disable WSL, one has to go back into
Control Panel -> programs-features -> turn on/off Windows features and deselect Windows Subsystem for Linux, and Save.
answered Apr 27, 2018 at 22:11
RopRop
1,2111 gold badge8 silver badges11 bronze badges
3
Edit — This would only work on Windows Server, not on Client OS.
Similar to what Rop suggested, but you can also use Powershell to completely remove the Windows Subsystem for Linux, with the advantage of not having to look for it in Control Panel. Note that you will have to run this as an administrator.
Remove-WindowsFeature Microsoft-Windows-Subsystem-Linux
List all the features available, filtering for Linux:
Get-WindowsFeature | Where-Object Name -like '*linux*' | Select-Object Name
answered Apr 6, 2020 at 16:54
AbrahamAbraham
1861 silver badge5 bronze badges
2
Just a few notes for experimenters, but for Windows 10 client o/s, you can use the following:
(Get-WindowsOptionalFeature -Online -FeatureName '*linux*') | Select-Object FeatureName
Then:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Or the analogue:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You can use other tooling to the same affect, such as dism.exe (as illustrated here: https://evidencen.com/wsl2/)
answered Mar 11, 2021 at 12:22
I combined removing Ubuntu-18.04
wslconfig /l
wslconfig /u 'Ubuntu-18.04'
and with adding and launching Ubuntu-20.04 from the Windows store
to successfully get WSL 2.0 running again it stopped working. I was getting
[process exited with code 4294967295]
when I launched wsl 2.
Greenonline
2,25511 gold badges24 silver badges31 bronze badges
answered Aug 5, 2020 at 17:13
I can’t seem to get a clean uninstall of WSL. I had WSl2 installed and was having DNS problems so I wanted to uninstall everything and go back to WSL 1.
I turn off the feature, delete the distros, delete the «WSL update app», make sure HyperVisor and Windows Subsystem for Linux are disabled in «Programs and Features», and reboot.
It looks like it’s uninstalled.
But then when I try to install the minimum WSL again (ie just enabling WSL in Windows Programs and Features, rebooting, and downloading a distro, when I launch the distro I get
«… WLS 2 requires an update to its kernel component..»
Why is it complaining about WSL2? I’m just trying to install WSL1? My guess is that there is some registry bit or something that still makes it look like I’m trying to use WSL 2.
Any ideas on how to get a truly clean uninstall of WSL so I can get back to version 1?
answered Jul 30, 2021 at 17:17
1
Windows 10:
- search: «optional features» (-> manage optional features)
- second last entry on page: more windows features
- second last entry: WSL
answered Jun 3, 2021 at 19:01
You must log in to answer this question.
Not the answer you’re looking for? Browse other questions tagged
.
Not the answer you’re looking for? Browse other questions tagged
.