Wsl: CentOS / Red Hat Enterprise Linux?

Created on 27 May 2018  路  9Comments  路  Source: MicrosoftDocs/WSL

Does anyone know if it is planned to add a new Linux subsystem in the future, such as CentOS / Red Hat?

Most helpful comment

Some distros are available only via GitHub releases. They were implemented using (a very thin C99) OS-agnostic wrapper called WSLDL. ATM, we have Alpine, Arch, Artix, CentOS, Void (glibc & musllibc) available: https://github.com/yuk7/wsldl#install-with-prebuilt-rootfs.

Navigate to one of those repos, fetch latest release build (zip) e.g. CentOS-7.5.1804.zip at https://github.com/fbigun/WSL-Distro-Rootfs/releases/tag/v0.0.1. After that extract the zip, execute CentOS.exe. That will register the OS with WSL which is normally already in PATH -- subsequently type centos[enter] form cmd/powershell. To unregister the installed OS; wslconfig /u centos from cmd/pwsh.

All 9 comments

When Fedora becomes available (still waiting on legal last I checked), CentOS will also be able to be added to the Windows Store. As far as RHEL goes, they're being super silent about it over at Red Hat. Recommend using https://github.com/Microsoft/wsl-distrolauncher to get an image of any Linux distro not currently in the Store available for use in WSL. The image you use does matter, so try to use Docker images first (minus Fedora, that one has too many issues too).

Some distros are available only via GitHub releases. They were implemented using (a very thin C99) OS-agnostic wrapper called WSLDL. ATM, we have Alpine, Arch, Artix, CentOS, Void (glibc & musllibc) available: https://github.com/yuk7/wsldl#install-with-prebuilt-rootfs.

Navigate to one of those repos, fetch latest release build (zip) e.g. CentOS-7.5.1804.zip at https://github.com/fbigun/WSL-Distro-Rootfs/releases/tag/v0.0.1. After that extract the zip, execute CentOS.exe. That will register the OS with WSL which is normally already in PATH -- subsequently type centos[enter] form cmd/powershell. To unregister the installed OS; wslconfig /u centos from cmd/pwsh.

There have been some changes to this status since it was brought to my attention from notifications. We have Fedora Remix and Wlinux Enterprise offered by WhiteWater Foundry, a Red Hat partner via the Store. You could also compile yourself, the Wlinux Enterprise by default comes with Scientific Linux but I did figure out how to quickly and easily convert to the latest CentOS that I tweeted about when Wlinux Enterprise first came out. It has also been tested for RHEL (even though the only real difference is the headers) and works beautifully. Since I mentioned the other 2, there's also Wlinux, a Debian based distro optimized for WSL. The others are optimized for WSL as well but don't include the wlinux-setup that automatically installs and configures the dev flow environment you want. I would highly recommend these over the project listed above. Here are the links to each:

https://github.com/WhitewaterFoundry/WLinux

https://github.com/WhitewaterFoundry/WLE

and lastly, https://github.com/WhitewaterFoundry/WSLFedoraRemix

Note that WLinux is not free on the Store - being 拢16.74 and 拢83.49 for standard (Debian) and enterprise (RHEL).

Also @DarthSpock I cannot find this tweet you mention of how to switch it to CentOS.

You could build any of them for free. The Enterprise was on a limited sale for $5 though. Point of the FedoraRemix and Wlinux costing money is to support the devs who can't afford to rely on donations to sustain the projects. They are rather affordable and if something truly breaking affects you, you are always able to get a refund though I'd suggest giving them a chance to make it right as they are actually good about getting bugs fixed quickly and efficiently.

Found the link for the personal user version of Wlinux Enterprise and is currently 5.99. https://www.microsoft.com/en-us/p/wlinux-enterprise/9n8lp0x93vcp?activetab=pivot:overviewtab

We on the WSL team don't add the distributions, these are provided by their respective distro maintainers. We also provide the command here on the reference page on how you can use the wsl --import to import your own distro from a tarball.

Whoops! Thanks OrangeDog, I've updated the link in my comment.

Was this page helpful?
0 / 5 - 0 ratings