Skip to content

WSL2: Ubuntu 18.04 Serial devices are no longer mounted properlyย #4322

Open

Description

  • Your Windows build number: Microsoft Windows [Version 10.0.18932.1000]

  • What you're doing and what's happening:

  1. run WSL2 Ubuntu 18.04
  2. plugin USB to serial device
  3. watch it mount under COM devices in device manager
  4. attempt to open the device in WSL2
  5. cat /dev/ttyS[X]
  • What's wrong / what should be happening instead:
    This works under WSL1 flawlessy, it no longer works in WSL2
    in WSL2 we can clearly see it is not connected or configured
    /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
    COM3-wsl-pic

COM3-pic

Activity

  1. rubberduck203 commented on Jul 28, 2019

    @rubberduck203

    Itโ€™s clearly called out in the FAQ that there is currently no support for USB in WSL2.

    Iโ€™d like to toss my voice in here that this should be a priority feature for WSL2.

    One of the big benefits of WSL2 is the opportunity to run Docker natively instead of on Docker for Windows. It is notoriously hard to get access to USB devices in Docker on non-Linux systems.

    I commonly use Docker for creating tool-chain images, but this falls apart when youโ€™re working with embedded devices, where you need to connect to a USB device or serial port in order to flash/debug on device. If I can run a docker container natively and access USB ports with WSL2, I can make an extremely strong argument for switching from Mac to Windows.

  2. linweifu commented on Nov 20, 2019

    @linweifu

    up

  3. zawawimanja commented on Nov 28, 2019

    @zawawimanja

    so that why I cannot see my usb device in ubuntu.hurmmm

  4. rubberduck203 commented on Nov 28, 2019

    @rubberduck203

    It would be really nice if someone could chime in letting us know if this is even technically feasible.

  5. sebbean commented on Dec 3, 2019

    @sebbean

    would love to know

  6. chenhu66 commented on Apr 4, 2020

    @chenhu66

    what a pity! i gotta roll back to wsl 1. Hopefully, usb support comes up soom for wsl2

  7. tleroy-dev commented on May 11, 2020

    @tleroy-dev

    what a pity! i gotta roll back to wsl 1. Hopefully, usb support comes up soom for wsl2

    Can I have the detailed step to roll back from WSL2 to WSL1 ?
    I found under https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-18917 that WSL2 was introduced at build version 18917. Now, how can I re-install WSL from a specific build number ? Thank you.

    EDIT my current build number is below 18917 and should be WSL1, right ? But the USB COM PORT is not recognized in WSL env.

    My current os version:

    PS C:\Users\nxf43719> [System.Environment]::OSVersion.Version
    
    Major  Minor  Build  Revision
    -----  -----  -----  --------
    10     0      17134  0
    
  8. rubberduck203 commented on May 11, 2020

    @rubberduck203

    I thought you could have WSL1 and WSL2 installed side by side?

  9. tleroy-dev commented on May 11, 2020

    @tleroy-dev

    Christopher McClellan (@rubberduck203) it's not clear to me how to check which WSL version we are running. It is not described in the app store. From online information I have found:

    We need to run Windows Build 16215 or later to install WSL 1.

    WSL 2 is only available in Windows Builds 18917 or higher.

    You can install both version if your build is higher than 18917.
    So in my case I am running a 17134 build, I should only have WSL1 available, correct ?
    In my case I still have troubles accessing serial USB device from my linux terminal under /dev/. They don't show up but are dettected in Windows Device Manager.

  10. bburky commented on May 11, 2020

    @bburky

    tleroy-dev If your system supports WSL2, you can choose WSL1 or WSL2 per distro.

    VERSION from wsl --list --verbose shows if you're using WSL1 or WSL 2:

    > wsl --list --verbose
      NAME                   STATE           VERSION
    * docker-desktop-data    Stopped         2
      docker-desktop         Stopped         2
      Ubuntu-18.04           Stopped         2
      Fedora-32              Stopped         2
      Ubuntu                 Stopped         1
    

    The normal recommendation is to use WSL2 for installation of all new WSL distros. Note, this doesn't affect your current installed WSL distros, if you have any already they will stay on WSL1.

    wsl --set-default-version 2
    

    If you want to manually upgrade a distro to WSL2 or "downgrade" it to WSL1, you can use --set-version. I keep a WSL1 distro around to have functioning /dev/ttyS* devices.

    wsl --set-version Ubuntu 1
    
  11. tleroy-dev commented on May 11, 2020

    @tleroy-dev

    Blake Burkhart (@bburky) Thanks for your response.

    PS C:\Users\user> wsl --list --verbose
    /bin/bash: --: invalid option
    

    From that documentation, it looks like the wsl.exe command works only on build higher than 1903, older version use wslconfig.exe. Result of equivalent :

    PS C:\Users\user> wslconfig.exe /list /all
    Distributions du sous-systรจme Windows pour Linuxย :
    Ubuntu (par dรฉfaut)
    

    It's in french in my case (system default), it does not output the version specifically, I guess from what I have described earlier, being on a pre-WSL2 build (17134) , only WSL 1 is enabled in my case.

  12. bburky commented on May 11, 2020

    @bburky

    tleroy-dev Yes, sounds like you're definitely on WSL1 then.

  13. tleroy-dev commented on May 11, 2020

    @tleroy-dev

    I have opened a new ticket for my problem under WSL 1 (#5203)

  14. AsciiWolf commented on May 22, 2020

    @AsciiWolf

    Any news regarding USB devices support in WSL2?

  15. 164 remaining items

  16. bwims commented on Jul 6, 2023

    @bwims

    I've now installed VMWare, and it works perfectly well for my needs (Docker and access to USB devices)
    EVEN BETTER, it uses NAT and DHCP to get a SENSIBLE IP address!

    Sadly, it appears WSL1 and WSL2 are a waste of time for different reasons.

  17. jjclose commented on Jul 6, 2023

    @jjclose
  18. adalava commented on Jul 6, 2023

    @adalava

    I was enjoying WSL but I gave up and moved to Linux completely. I still have Windows installed on another partition since some tools are Windows only, but most Windows applications that use serial port are so simple that run fine under Wine on Linux.

  19. shadrqen commented on Mar 14, 2024

    @shadrqen

    This guide will walk through the steps necessary to connect a USB device to a Linux distribution running on WSL 2 using the USB/IP open-source project, usbipd-win.

  20. jviskari commented on Mar 15, 2024

    @jviskari

    Still workaround. This feature should be built in WSL.

  21. compnski commented on Mar 15, 2024

    @compnski

    I also gave up on windows and just use linux full time. https://www.codeweavers.com/crossover has been helpful in running any last software that regular wine didn't work with.

  22. crose72 commented on May 3, 2024

    @crose72

    I actually followed the steps here https://learn.microsoft.com/en-us/windows/wsl/connect-usb and I had it working for both windows 10 and 11 from what I can remember. I haven't needed to connect my FTDI serial to USB converter to WSL2 for a while and I just followed my notes and it's no longer working. I can attach the device to WSL2, but it no longer shows up in /dev/ttyUSB0 anymore. How do I fix that?

  23. Clockwork-Muse commented on May 3, 2024

    @Clockwork-Muse

    Cameron Rose (@crose72) - You'll want/need to check the usbipd repo, likely.

    Note that there are a number of issues with some specific serial chips, like this one, many of which stem from the default kernel not containing certain drivers - you may need to compile one yourself.

  24. crose72 commented on May 11, 2024

    @crose72

    Stephen A. Imhoff (@Clockwork-Muse) so it was working in July 2023 with my FTDI to USB, and I didn't change anything about my WSL2 setup so why would it just stop working?

  25. Clockwork-Muse commented on May 11, 2024

    @Clockwork-Muse

    I'm the wrong person to ask, unfortunately.

  26. crose72 commented on May 11, 2024

    @crose72

    Stephen A. Imhoff (@Clockwork-Muse) no worries, I'll try your suggestion all the same. Are there any FTDI to USB devices that you know work? If so I wouldn't mind getting one of those as a quick solution.

  27. mrv96 commented on May 29, 2024

    @mrv96

    It seems that we have a solution for the issue of Cameron Rose (@crose72) (and mine): dorssel/usbipd-win#948 (comment)

  28. OsamaAtef2025 commented on Mar 1, 2025

    @OsamaAtef2025
    • ุฑู‚ู… ุฅุตุฏุงุฑ Windows ุงู„ุฎุงุต ุจูƒ: Microsoft Windows [ุงู„ุฅุตุฏุงุฑ 10.0.18932.1000]
    • ู…ุง ุชูุนู„ู‡ ูˆู…ุง ูŠุญุฏุซ:
    1. ุชุดุบูŠู„ WSL2 Ubuntu 18.04
    2. ุชูˆุตูŠู„ USB ุจุฌู‡ุงุฒ ุชุณู„ุณู„ูŠ
    3. ุดุงู‡ุฏู‡ ูŠุชู… ุชุซุจูŠุชู‡ ุถู…ู† ุฃุฌู‡ุฒุฉ COM ููŠ ู…ุฏูŠุฑ ุงู„ุฃุฌู‡ุฒุฉ
    4. ุญุงูˆู„ ูุชุญ ุงู„ุฌู‡ุงุฒ ููŠ WSL2
    5. ุงู„ู‚ุท /dev/ttyS[X]
    • ู…ุง ู‡ูˆ ุงู„ุฎุทุฃ / ู…ุง ุงู„ุฐูŠ ูŠุฌุจ ุฃู† ูŠุญุฏุซ ุจุฏู„ุงู‹ ู…ู† ุฐู„ูƒ:
      ูŠุนู…ู„ ู‡ุฐุง ุฏูˆู† ุฃูŠ ุนูŠูˆุจ ููŠ WSL1ุŒ ูˆู„ู… ูŠุนุฏ ูŠุนู…ู„ ููŠ WSL2
      ููŠ WSL2 ูŠู…ูƒู†ู†ุง ุฃู† ู†ุฑู‰ ุจูˆุถูˆุญ ุฃู†ู‡ ุบูŠุฑ ู…ุชุตู„ ุฃูˆ ุบูŠุฑ ู…ู‡ูŠุฃ
      /dev/ttyS3ุŒ UART: ุบูŠุฑ ู…ุนุฑูˆูุŒ ุงู„ู…ู†ูุฐ: 0x02e8ุŒ IRQ: 3
      COM3-wsl-pic

    COM3-pic

    Osama

  29. h8920981945 commented on Mar 1, 2026

    @h8920981945

    It seems that we have a solution for the issue of Cameron Rose (@crose72) (and mine): dorssel/usbipd-win#948 (comment)

  30. chri873 commented on Apr 11, 2026

    @chri873
    • Your Windows build number: Microsoft Windows [Version 10.0.18932.1000]

    • What you're doing and what's happening:

    1. run WSL2 Ubuntu 18.04
    2. plugin USB to serial device
    3. watch it mount under COM devices in device manager
    4. attempt to open the device in WSL2
    5. cat /dev/ttyS[X]
    • What's wrong / what should be happening instead:
      This works under WSL1 flawlessy, it no longer works in WSL2
      in WSL2 we can clearly see it is not connected or configured
      /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
      COM3-wsl-pic

    COM3-pic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurewsl2Issue/feature applies to WSL 2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions