Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is not “real Linux” about WSL?


* You can't run your distro of choice unless you build it yourself

* Lots of programs don't work properly (citation needed, can't remember specifics)

* You can only run command line programs, although I understand this could be different in Windows 11

My last job mandated windows laptops so I used WSL for a couple of months before I got too frustrated and just ran a virtualbox VM.


>You can only run command line programs, although I understand this could be different in Windows 11

WSLg solves this, apparently

https://github.com/microsoft/wslg


In the article it says clearly that you can run the distro of your choice using WSL.


The distro of your choice from the small pool that you are given to choose from.

It's not a completely unrestricted choice.

That pool includes Ubuntu, Debian, SUSE, Fedora and a few others if I remember correctly, although it may have expanded since.

I'm not sure how straightforward rolling your own is.


You have no idea what you are talking about. You can install any kind of distribution by copying over their rootfs. For example, I am running Void Linux on WSL2.


The pool in question is open - anybody (not just Microsoft) can package and publish a distro there.

And for one-off use, there's wsl --import: https://docs.microsoft.com/en-us/windows/wsl/use-custom-dist...


And building a custom one is easy. I have Gentoo running in WSL with no fuss.


Can it run Linux From Scratch (LFS)? It seems like it could.


Yes sure it can, create a usable (chrootable) Linux From Scratch rootfs tarball and import it using wsl --import, and everything should be fine. Though don't forget to remove the kernels because WSL don't load them, instead WSL uses a custom kernel shipped with the Windows system.


Can't you run an xorg server under Windows and let the WSL apps connect to that?


Yeah, you can, but it's pretty janky.


Not if you use an X server that's specifically designed for it: https://x410.dev/


I'll have to check that out, thanks!


One of the most frustrating thing is that WSL is not a booted Linux. Systemd and other things don't work out of the box even in WSL2. In WSL1 it is almost impossible to make Systemd work, and in WSL2 a wrapper is needed to create a SUID 1 (if I am not wrong) environment to emulate a booted environment. Other than this, the kernel used by WSL2 is a custom, Microsoft-tailored LTS version which may cause some problems if some program rely on very new syscalls.


People are voting me down but it’s mostly from misinformation. WSL runs standard Linux distributions, it’s the real deal, not an imitation or anything that could be considered bad. If you face issues with it it’s mostly because of a fundamental misunderstanding of the setup (for example the person trying to run systemd…), not because it isn’t a „real Linux“.


it runs a modified kernel in a VM and it makes some basic things like mounting suck and IO slooow


That's exactly what I mean by misinformed. WSL 2 isn't using a simple virtual machine the way it is generally understood. It is instead using a lightweight VM using Hyper-V, there is no booting time. IO in itself isn't slow if you move files to the Linux FS. What is slow is the communication between Windows <—> Linux filesystems.

Edit: regarding the custom kernel, you can create your own if you want, nothing is blocking you from doing so https://kumekay.com/compiling-custom-kernel-for-wsl2/.

Microsoft's kernel is also available on github: https://github.com/microsoft/WSL2-Linux-Kernel.


I know and I was referring to the windows <--> wsl IO

It's nice to be able to run Linux in windows but it's like driving a Ferrari inside a Honda. You do it because its nicer than context switching when you have to drive the Honda, not because it's like driving an actual Ferrari


It is "real linux". Or I should say "real desktop Linux". Most people who don't like it for some reason are trying to use it like a server.


Any virtualization solution has the complexity of the sum of the environments being run simultaneously, the virtualization solution, and the surface where all 3 interact. Furthermore the guest solution inherently deals with the system at a higher level wherein you are stuck with how the host handles lower level aspects.

Such a system is simultaneously worse and more complicated as a necessary price for running both native windows applications and linux ones. In most cases you would be better off just running Windows or running actual Linux.

For example my Linux system has a ZFS root filesystem which provides a lot of interesting features including the ability to boot a prior version of my install at startup, along with 37 other useful things. Running a linux VM with that feature wouldn't magically port this functionality to the rest of the system.

My Linux system is vastly less likely to fall victim to a cryptolocker or other malware situation but running a vm under my Windows desktop wouldn't deliver this benefit.

My Linux system handles virtual desktops per monitor making it easy to swap one monitor at a time to a different workspace or all together if I please. Again neither running an app via a compatibility layer nor a fullscreen VM would provide this functionality.

WSL is Linux light without most of the interesting features and able to be withdrawn any given year by Microsoft. Worse it could be extended in ways that depend on windows features in a classic Microsoft move.


Come on.


Any argument to develop?


Yeah I just use VMWare on Windows and call it a day


tmpfs is mapped to filesystem, so if you need to have tmpfs mount in docker, the performance will be a lot slower

https://stackoverflow.com/questions/64401190/can-i-use-docke...


I think you cannot run X-Window applications out of the box


What makes real Linux by your criteria? Linux the kernel is easy driverless installs of hardware, windows isn’t driverless.


mounting network drives is a pain


the windows part.


WSL runs a standard Linux side by side with windows. There are no “Windows part” overlapping with it. A way to think about it is that you have two system that share devices and file systems.


the windows part is the windows that is running as the host os.

happy to run windows in a vm though, that way you can stop it when it starts doing weird windows things.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: