7 ms·
What is not “real Linux” about WSL?
by dgellow 5y ago
What is not “real Linux” about WSL?
- a-dub 5y agothe windows part.
- dgellow 5y agoWSL 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.
- a-dub 5y agothe 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.
- darthrupert 5y agoCome on.
- dgellow 5y agoAny argument to develop?
- alichapman 5y ago* 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.
- DeathArrow 5y agoIn the article it says clearly that you can run the distro of your choice using WSL.
- testermelon 5y agoCan it run Linux From Scratch (LFS)? It seems like it could.
- shanoaice 5y agoYes 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.
- withinboredom 5y agoAnd building a custom one is easy. I have Gentoo running in WSL with no fuss.
- gertrunde 5y agoThe 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.
- int_19h 5y agoThe 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-distro https://docs.microsoft.com/en-us/windows/wsl/use-custom-dist...
- Atomskun 5y agoYou 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.
- GhettoComputers 5y agoWhat makes real Linux by your criteria? Linux the kernel is easy driverless installs of hardware, windows isn’t driverless.
- cerved 5y agomounting network drives is a pain
- phendrenad2 5y agoIt 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.
- apatheticonion 5y agoYeah I just use VMWare on Windows and call it a day
- coder91 5y agoI think you cannot run X-Window applications out of the box
- michaelmrose 5y agoAny 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.
- shanoaice 5y agoOne 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.
- rizalp 5y agotmpfs 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-docker-tmpfs-in-wsl2-for-running-docker-containers-on-ram https://stackoverflow.com/questions/64401190/can-i-use-docke...
- dgellow 5y agoPeople 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“.
- cerved 5y agoit runs a modified kernel in a VM and it makes some basic things like mounting suck and IO slooow
- dgellow 5y agoThat'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/ https://kumekay.com/compiling-custom-kernel-for-wsl2/. Microsoft's kernel is also available on github: https://github.com/microsoft/WSL2-Linux-Kernel https://github.com/microsoft/WSL2-Linux-Kernel.
- cerved 5y agoI 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