Windows 10: WSL problem -- all wsl commands don't work

Discus and support WSL problem -- all wsl commands don't work in Windows 10 Software and Apps to solve the problem; Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the... Discussion in 'Windows 10 Software and Apps' started by AlexisH34, Feb 2, 2023.

  1. AlexisH34 Win User

    WSL problem -- all wsl commands don't work


    Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the problem :- I first reinstall windows 10 - I installed WSL through this link .- Everything was working though with the Ubuntu 20.04 installed though I wanted Ubuntu 22.04- When I was looking at wich distro I could install by using the command :wsl --list --online- So I was like, hey maybe, I could use the command wsl --update to update my wsl, maybe it was not fully updated. I was wrong, it was my Windows not updated.But anyway, I tried the comman

    :)
     
    AlexisH34, Feb 2, 2023
    #1

  2. WSL Not Working

    Hi,

    Thanks for your post in Microsoft Community.

    I understand that you are having issues with WSL crashing. There is very little help I can offer on this issue. You can ask questions in more specialized forums.



    Have you ever uninstalled and reinstalled WSL? Uninstalling and reinstalling directly may cause problems first. You can log out of WSL in the command prompt.

    Execute the following command:

    In the meantime, you can try posting Microsoft Docs asking your question. Hope you get a good answer.

    Kirk | Microsoft Community Support Specialist

    --------------------------------------------------

    * Beware of scammers posting fake support numbers here.

    * If your problem is not solved, you could reply to the post again and we would continue to provide technical support for you.

    * Please check and vote this answer if it helps as it will be beneficial to more community members reading here.
     
    Kirk -MSFT, Feb 2, 2023
    #2
  3. WSL

    Version 2 of WSL uses a new lightweight utility virtual machine capability. To enable the lightweight virtual machine and WSL, you need to enable two Windows features: Virtual Machine Platform and Windows Subsystem for Linux.

    To enable these features via the user interface (UI), press the Windows key and enter Windows Features, then click on Turn Windows features on or off.
    When the Windows Features dialog appears, check the boxes for Virtual Machine Platform and Windows Subsystem for Linux.




    If you want to make version 2 the default for any Linux distros you install then run the following command:


    Code:
    Now you can install Linux distro from Microsoft Store it will be running version 2 of WSL.

    A distro can be converted between versions of WSL after installation. To achieve this, you use the wsl --set-version command.

    This command takes two arguments:

    • The name of the distro to update
    • The version to convert it to

    An example of converting the Ubuntu distro to version 2 is shown here:

    Code:
    Execute wsl --list --verbose versions of WSL installed distro.
     
    FreeBooter, Feb 2, 2023
    #3
  4. Brink Win User

    WSL problem -- all wsl commands don't work

    Systemd support is now available in WSL

    Many popular distributions run systemd by default, such as Ubuntu, Debian and more. This change means that WSL will be even more similar to using your favorite Linux distros on a bare metal machine, and will let you use software that depends on systemd support.

    A few examples of Linux applications that depend on systemd are:

    • snap
      • A handy binary that allows you to install and manage software inside Ubuntu.
      • Try running: snap install spotify or snap install postman
    • microk8s
    • systemctl
      • A tool that’s part of systemd, interact with services on your Linux machine
      • Try systemctl list-units --type=service to see which services are available and their status
    How is this change possible in WSL?

    Supporting systemd required changes to the WSL architecture. As systemd requires PID 1, the WSL init process started within the Linux distribution becomes a child process of the systemd. Because the WSL init process is responsible for providing the infrastructure for communication between the Linux and Windows components, changing this hierarchy required rethinking some of the assumptions made with the WSL init process. Additional modifications had to be made to ensure a clean shutdown (as that shutdown is controlled by systemd now) and to have compatibility with WSLg, It is also important to note that with these change, systemd services will NOT keep your WSL instance alive. Your WSL instance will stay alive in the same way it did before, which you can read more about here.

    Given that this changes how WSL behaves when booting up, we wanted to be careful about applying this to user’s already existing WSL distros. So currently you need to opt-in to enable systemd for a specific WSL distro, and we will monitor feedback and investigate making this behavior by default in the future.

    How can you get systemd on your machine?

    To get started, you will need to do these two things: – Ensure you are running the right version of WSL: Version 0.67.6 and above – Set the systemd flag set in your WSL distro settings

    Ensuring you are on the right WSL version

    This change is only available in the Microsoft Store version of WSL version 0.67.6 and higher. You can check your version number by running wsl --version. If that command fails then you are running the in-Windows version of WSL and need to upgrade to the Store version.

    This version of WSL is now available in the Microsoft Store to users on Windows Insiders build for initial testing, and then after a few weeks we will make it available to all users to ensure quality. You can run wsl --update to check for any WSL updates.

    If you are not on Windows Insiders and want to use it immediately, you can download the latest release from the WSL release page.

    Set the systemd flag set in your WSL distro settings

    You will need to edit the wsl.conf file to ensure systemd starts up on boot.

    Add these lines to the /etc/wsl.conf (note you will need to run your editor with sudo privileges, e.g: sudo nano /etc/wsl.conf):

    Code:
    And close out of the nano editor using CTRL+O to save and CTRL+X to exit.

    Final steps

    With the above steps done, close your WSL distro Windows and run wsl.exe --shutdown from PowerShell to restart your WSL instances. Upon launch you should have systemd running. You can check this with the command systemctl list-unit-files --type=service which should show your services’ status.

    Acknowledgements and Feedback!

    Thank you to the Canonical team for working with us to deliver this feature! Check out Canonical’s blog post here. For any technical issues please file them on the Microsoft/WSL Github repo. You can follow up with WSL team members, or with me on Twitter. Lastly, learn more about WSL, including how to set up common development tools like Git, VS Code, Docker containers, databases, GPU acceleration for machine learning, and more, by visiting the WSL documentation.
    Source: https://devblogs.microsoft.com/comma...ilable-in-wsl/

    Microsoft Store: https://www.elevenforum.com/t/instal...indows-11.377/
     
    Brink, Feb 2, 2023
    #4
Thema:

WSL problem -- all wsl commands don't work

Loading...
  1. WSL problem -- all wsl commands don't work - Similar Threads - WSL problem wsl

  2. WSL Windows Subsystem For Linux "wsl" command not found

    in Windows 10 Gaming
    WSL Windows Subsystem For Linux "wsl" command not found: Guys help, I've contacted ms support multiple times and none of the agents have been able to solve the issue.so, I have Windows Subsystem for Linux WSL with Ubuntu installed. yesterday, i tried to install docker, and it was kind of a mess, so i just uninstalled it in every...
  3. WSL Windows Subsystem For Linux "wsl" command not found

    in Windows 10 Software and Apps
    WSL Windows Subsystem For Linux "wsl" command not found: Guys help, I've contacted ms support multiple times and none of the agents have been able to solve the issue.so, I have Windows Subsystem for Linux WSL with Ubuntu installed. yesterday, i tried to install docker, and it was kind of a mess, so i just uninstalled it in every...
  4. WSL Windows Subsystem For Linux "wsl" command not found

    in Windows 10 BSOD Crashes and Debugging
    WSL Windows Subsystem For Linux "wsl" command not found: Guys help, I've contacted ms support multiple times and none of the agents have been able to solve the issue.so, I have Windows Subsystem for Linux WSL with Ubuntu installed. yesterday, i tried to install docker, and it was kind of a mess, so i just uninstalled it in every...
  5. WSL problem -- all wsl commands don't work

    in Windows 10 Installation and Upgrade
    WSL problem -- all wsl commands don't work: Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the problem :- I first reinstall windows 10 - I installed WSL through this link .- Everything was working though with the Ubuntu...
  6. WSL problem -- all wsl commands don't work

    in Windows 10 Gaming
    WSL problem -- all wsl commands don't work: Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the problem :- I first reinstall windows 10 - I installed WSL through this link .- Everything was working though with the Ubuntu...
  7. WSL Not Working

    in Windows 10 Gaming
    WSL Not Working: Hello,My WSL is not working on my laptop. It crashes immediately after running the Ubuntu app and trying to launch it in the command and PowerShell prompts. I have turned off the hypervisor feature and turned it back on. I have done the same for the virtual environment...
  8. WSL Not Working

    in Windows 10 Software and Apps
    WSL Not Working: Hello,My WSL is not working on my laptop. It crashes immediately after running the Ubuntu app and trying to launch it in the command and PowerShell prompts. I have turned off the hypervisor feature and turned it back on. I have done the same for the virtual environment...
  9. WSL problem

    in Windows 10 Network and Sharing
    WSL problem: Hi , I have a particular situation with my WSL installation: I have a windows 10 machine with WSl2 installed , in the WSL I have a webserver Now I connect to the machine with my account and startup the webserver in wsl and let my session open in order to let the webserver...
  10. WSL not working

    in Windows 10 Ask Insider
    WSL not working: WSL with Ubuntu 20.04 was working fine until I updated to version 20197.1000. After updating I'm unable to start a WSL shell or install a new distribution. I can't even access Linux folder in windows file explorer. I can't even install another version of Linux from the...