180 points · by Tomte · 5y ago · 297 comments
I had had them setup with WSL as a way of moving forward, here's a few things I noticed:
- different home directories, the different distros are accessed as network shares. It can get confusing where "Home" is unless you explicitly stumble a few times and verify always where files are.
- Issues with CR/LF. You need to be careful using native windows tooling and having saved files in Windows line endings vs Unix. For non-savvy users the content looks correct but on Unix the tooling will fail in weird ways.
- Visual Studio Code integration was actually excellent, my coworker ended up using VS Code to do Filesystem operations more so than using Windows Explorer.
- The new Windows Terminal is fantastic, hopefully its bundled with Win 11.
I'm really grateful for the technical capabilities that WSL brings out. I hope the dev teams are focused on fixing the subtle UX issues that trip up users.
Edit: 3 bytes, not 2 (thanks!)
Very annoying!
That kinda implies this isn't a small shop, so "breaking" a windows machine IT provisioned to put Linux onto it might be out of the question, both in terms of requisition, access to the UEFI, or even network configuration.
Or said coworker is more familiar with Mac/Windows than <Insert Linux Distro and particular window manager here>, so this is best of a bad situation.
You can domain join via Winbind or SSSD. Exchange via Evolution or Kmail and other work arounds exist. TPM 2.0 has been supported for quite a while so all good for encryption and other attestation tasks. We have rather a lot of host based firewalls (sore point 8) but it looks like the latest effort might stick for a while longer than the past ones.
...
Oh, you use that ... vendor ... SSL VPN. OK, can't do that and that's generally where it falls apart. We do have several.
I can and do operate solely on Linux but I have the benefit of owning the company. Some of my customers insist on their gear/setup for their environment and that's fine: they get to buy it too.
It is, and it's even the default prompt in the Win+X menu
Is this still really a thing? even notepad can handle LF. I guess the default could still be crlf for some apps.
Do yourself a favor. Go for the real thing, don't accept poor substitutes.
It alway needed lots of time to configure things to make it half decent, the configuration would broke from time to time. Some software which I want to use either runs poorly using Wine, either can't be run at all.
I am much more comfortable using Windows as a desktop and WSL has eliminated the need to dual boot or use a Linux VM.
I loved the new WSL2 upgrades but rolled back because I simply couldn't do the rest of my work as quickly in Windows 11. Forcing the grouping of apps on the Taskbar was major productivity hit for me, as was the simplified context menu in Explorer.
It is hard to characterize linux distros in broad terms because they all take such different approaches — two could be as similar as Windows 10 vs 8, or as different as Windows vs Mac!
Using Linux distributions since 1995.
And I really don't get WSL, other than Windows trying to cater to the macOS crowd.
I have been using VMWare since 2010, when I need Linux on the laptop and have never felt I need something else.
For me the only thing I would get from WSL is not having to fight with IT for VMWare licenses.
# pkg install coreutils
Now you have all GNU utulities with 'g' prefix: % pkg info -l coreutils | grep bin
/usr/local/bin/g[
/usr/local/bin/gb2sum
/usr/local/bin/gbase32
/usr/local/bin/gbase64
/usr/local/bin/gbasename
/usr/local/bin/gbasenc
/usr/local/bin/gcat
/usr/local/bin/gchcon
/usr/local/bin/gchgrp
/usr/local/bin/gchmod
/usr/local/bin/gchown
/usr/local/bin/gchroot
/usr/local/bin/gcksum
/usr/local/bin/gcomm
/usr/local/bin/gcp
/usr/local/bin/gcsplit
/usr/local/bin/gcut
/usr/local/bin/gdate
/usr/local/bin/gdd
/usr/local/bin/gdf
/usr/local/bin/gdir
/usr/local/bin/gdircolors
/usr/local/bin/gdirname
/usr/local/bin/gdu
/usr/local/bin/gecho
/usr/local/bin/genv
/usr/local/bin/gexpand
/usr/local/bin/gexpr
/usr/local/bin/gfactor
/usr/local/bin/gfalse
/usr/local/bin/gfmt
/usr/local/bin/gfold
/usr/local/bin/ggroups
/usr/local/bin/ghead
/usr/local/bin/ghostid
/usr/local/bin/gid
/usr/local/bin/ginstall
/usr/local/bin/gjoin
/usr/local/bin/gkill
/usr/local/bin/glink
/usr/local/bin/gln
/usr/local/bin/glogname
/usr/local/bin/gls
/usr/local/bin/gmd5sum
/usr/local/bin/gmkdir
/usr/local/bin/gmkfifo
/usr/local/bin/gmknod
/usr/local/bin/gmktemp
/usr/local/bin/gmv
/usr/local/bin/gnice
/usr/local/bin/gnl
/usr/local/bin/gnohup
/usr/local/bin/gnproc
/usr/local/bin/gnumfmt
/usr/local/bin/gnustat
/usr/local/bin/god
/usr/local/bin/gpaste
/usr/local/bin/gpathchk
/usr/local/bin/gpinky
/usr/local/bin/gpr
/usr/local/bin/gprintenv
/usr/local/bin/gprintf
/usr/local/bin/gptx
/usr/local/bin/gpwd
/usr/local/bin/greadlink
/usr/local/bin/grealpath
/usr/local/bin/grm
/usr/local/bin/grmdir
/usr/local/bin/gruncon
/usr/local/bin/gseq
/usr/local/bin/gsha1sum
/usr/local/bin/gsha224sum
/usr/local/bin/gsha256sum
/usr/local/bin/gsha384sum
/usr/local/bin/gsha512sum
/usr/local/bin/gshred
/usr/local/bin/gshuf
/usr/local/bin/gsleep
/usr/local/bin/gsort
/usr/local/bin/gsplit
/usr/local/bin/gstdbuf
/usr/local/bin/gstty
/usr/local/bin/gsum
/usr/local/bin/gsync
/usr/local/bin/gtac
/usr/local/bin/gtail
/usr/local/bin/gtee
/usr/local/bin/gtest
/usr/local/bin/gtimeout
/usr/local/bin/gtouch
/usr/local/bin/gtr
/usr/local/bin/gtrue
/usr/local/bin/gtruncate
/usr/local/bin/gtsort
/usr/local/bin/gtty
/usr/local/bin/guname
/usr/local/bin/gunexpand
/usr/local/bin/guniq
/usr/local/bin/gunlink
/usr/local/bin/guptime
/usr/local/bin/gusers
/usr/local/bin/gvdir
/usr/local/bin/gwc
/usr/local/bin/gwho
/usr/local/bin/gwhoami
/usr/local/bin/gyesGnome 41 looks compelling and by the time consumer cards can be shared with VMs (for gaming, VR and that sort of thing), it might be as good as MacOS's desktop environment.
I can't wait to ditch Windows full time. It's such a confused mess of an OS.
It was ok, the level of integration and hardware quality being even excellent, but overall Linux is a better set of compromises for me.
* 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.
WSLg solves this, apparently
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.
https://stackoverflow.com/questions/64401190/can-i-use-docke...
They still haven't corrected the SEVERE disk read speed when accessing a Windows directory. For example, if you use zsh/Oh-My-Zsh and have any of the themes setup that pulls git info for the prompt (over 99% of them do this), cd into a git repo on your Windows side: cd /mnt/c/repos/example_git and expect a minimum of a 1 minute wait for simple repos.
The WSL IP Address changes on every restart.... ALWAYS. So trying to setup a local web server for testing becomes a hassle.
This should only be true if you're doing funny network stuff. On my machine, exposing WSL2 with 127.0.0.1:8080 allows me to connect on my Windows browser: https://i.judge.sh/shocked/Punch/WindowsTerminal_whYLqVLsIM....
Here's the github issue about it: https://github.com/microsoft/WSL/issues/4851
I got this when I tried to npm install a project and it was taking forever.
* you can't delete an opened file, which means every folder delete/move operation has to enumerate all descendents to acquire exclusive locks.
* every file operation goes through a filter driver (think virus scanners)
* the kernel parses path names, and (I think) maybe dispatches one operation per path element.
all of the above can't be fixed due to compatibility apparently. that's why WSL2 moved off of NTFS.
Yes that will be slow, don’t use /mnt, anything under that directly will crawl. Use /home or somewhere else and save your work there. In VSCode you can access any dir and now there’s gui support so there’s no excuse to be using /mnt now. I believe some docs on WSL do tell you this
> The WSL IP Address changes on every restart.... ALWAYS. So trying to setup a local web server for testing becomes a hassle.
That’s weird, I’ve never had any issues relating to running a web server. Listening on a port in WSL automatically exposes it on Windows. I’ve not had to configure anything when restarting etc.
I've had to set up a scheduled task[0] to update an entry in my hosts file every time WSL is assigned a new IP address, which works well enough.
[0]: https://abdus.dev/posts/fixing-wsl2-localhost-access-issue/
I know the blog post says localhost redirection “often fails” but that’s just never been the case for me, and the citation it uses is just a link to the WSL issues page rather than a specific issue.
I also have a cheap Intel laptop with integrated Xe graphics. WSL2 allows me to run accelerated training on it - https://devblogs.microsoft.com/windowsai/train-your-machine-...
no need to get expensive nvidia machines (of course not as good...but better than pure CPU)
Why remove "The best"? Feels like unnecessary editorializing
Unless the title is too long or is obvious scummy clickbait, IMHO titles shouldn't be editorialised.
What you'd means is "Windows 11 includes a revamped Windows Subsystem for Linux" if you wanted to removed the editorializing. But the article is editorializing - they don't like the rest of windows 11 and say so.
I tried it now and you could only choose Release Preview channel which still has only build 19044.
I'm probably going to make 10 the last version of Windows I install.
I do a lot of things that use usb rs232 adapters or things that look like them, and I support both linux and mac effortlessly (and even freebsd and any other unix) and none of it is possible under wsl2.
If all you want to do is write web services, there are native windows versions of all the scripting languages and web frameworks.
If you have some reason to actually use linux, then just use it. It's free and well-documented. Nothing's stopping you.
If MS actually cared about supporting developers, then they would provide a 1st class form of Wine, so that windows apps could be run from within linux.
Since they don't do that, this exposes that they don't actually care what would be convenient for you, and so, you should decline to work with people who don't work with you. That's how you can see through bullshit.
You should reject their products and sales pitches until their behaviour actually changes, and disregard all the lip service, "gifts" with strings, and excuses for dark patterns. Use their stuff when you must, but under duress and seeking other options at every turn.
I've had good experience with https://www.virtualhere.com/usb_client_software.
That's not semantics. What I mea is:
For any low level code of my own that I wrote to run on *ix, I can just as easily run that same code on an arduino or pi, and wsl2 and the usb server hardware would just be pointless extras.
For any code that I didn't write and can't port (say, closed source xilinx fpga programmer) there are native windows versions which work better and are better supported than the linux version anway. So here too wsl and usb server harware would both be pointless extras and backwards.
People are bamboozled and forgetting to step back and remember what the point of doing something even was in the first place.
I say it's a mistake to even get sucked in to the question of how to work around any deficiency in wsl, instead of asking why you even care or want to run a linux app on windows in the first place.
In my experience, there are a lot of tools that are easier to use on Linux, or are Linux-only, without a proper Windows alternative. WSL(g) allows seamless experience for running such apps, with some caveats (such as USB access.)
- 2024: dual support for native Linux & Windows 13 apps
- 2027: Linux & Windows 15 interop support
- 2030: run legacy Windows apps on Windows L (Linux)
Edit:
Further reading here:
I'm 100% convinced this is Microsoft's actual goal, and it's going to succeed very quickly at least on the desktop. Then one day, when a good number of apps will conveniently require WSL to run properly, or to run at all, MS could build their own Linux distribution containing licensed parts of Windows (drivers for closed hardware, graphics libraries, etc.) de facto displacing the original Linux from every other field of application including embedded, automotive, industrial, etc.
They don't care about the technology if they make money from it.
They used to sell an UNIX OS called Xenix.
I find this to be a pretty weak strawman, and one that not many people would consider to be part of their threat model (and if they are, they'd just purchase the part from a brick-and-mortar store so that, if there is malware, it's non-targeted).
Microsoft is mostly doing this for their endpoint security enterprise customers. The objectives aren't exactly hidden, either:
- Don't want anyone to be able to get data off of a bitlocker-encrypted drive[0]
- Don't allow things like O365 login credentials (including temporary auth tokens) to be pulled off a drive[1]
- Prevent thunderbolt 3 DMA (eg. from a rogue usb on the back of the computer)[2]
And yes, they probably also don't want people to keep hacking online video games, which is why Riot uses TPM attestation as an additional security measure to preventing people banned for hacking from evading bans in Valorant[3].
0: https://www.microsoft.com/security/blog/2020/11/17/meet-the-....
1: https://docs.microsoft.com/en-us/windows/security/threat-pro...
2: https://docs.microsoft.com/en-us/windows/security/informatio...
3: https://www.pcgamer.com/valorant-leads-the-charge-on-enforci...
on most of my gaming boards you buy the TPM and plug it into the board like you would a USB connector
total cost: ~$15 (ignoring currently craziness)
if I'm a wallhacker/aimbotter how would this stop me?
Preventing a piece of hardware, regardless who is using it, and not preventing the cheater on any other hardware.
It's a completely invalid idea and should not be defended or excused.
My Dell made Arch lappie runs up attested via a TPM 2.0. I boot UEFI, Secure boot to kernel and initrd.
On a Windows machine I’d prefer to use Azure cloud shell than WSL.
These things may be required by the security department. So WSL is a nice carrot there for them. Management through Windows and Linux on top of it. I worked in endpoint management so I can see the appeal.
However personally I really like the way Linux is free of corporate influence. In fact I switched to FreeBSD for that reason as I feel that big IT is getting too involved with Linux.
They're bleeding users to MacOS, Linux desktop installs is a rounding error.
But then they do things like Windows 11. Seriously has me considering Mac or Linux as a daily driver.
It's not going to happen. The Windows NT kernel is one of Microsoft's greatest assets; in fact it's better designed than Linux on many axes. Until recently it had better support for async I/O (and the developer experience of io_uring may still not measure up to IOCP under Windows), it was designed for multithreading, and it has a more advanced security model. It also has a more advanced driver model, which is to say it has a driver model at all. The fact that there's a standard ABI for drivers means hardware Just Works under Windows and is still incredibly fiddly under Linux. Microsoft essentially has stewardship over the entire PC platform because they play very nicely with OEMs and make hardware easy for Windows to support.
They are not going to give that up. It'd be the OS-kernel equivalent of giving up Alpha for Itanium.
If anything, the future of Linux is to be a guest under Windows NT. How many Hackernews have I heard repeat the mantra that the best Linux desktop environment is WSL?
> Microsoft essentially has stewardship over the entire PC platform
[citation needed]
https://docs.microsoft.com/en-us/windows-hardware/design/com...
https://docs.microsoft.com/en-us/windows-hardware/test/hlk/
There are no other standards for what a PC is. All of the open OSes, including Linux, just piggyback on Microsoft's standard. (And if anyone believes that the various giants building custom ARM processors aren't hoping that they can get dominance based on their own spec so that they can displace Microsoft and wield the same power, think again.)
- 2021: Windows Subsystem for Linux that can run pretty much any Linux program
- 2024: Custom proprietary extensions in WSL, hidden "incentives" to make sure some important software runs only on WSL
- 2027: Nobody uses Linux without WSL anymore
- 2030: WSL now costs $200 per year.
The headline of the article is: "WSL is finally easy to install—and offers automatic sound/graphics support."
All of this stuff was available before Windows 11, to anyone/everyone.
I know, because the way I installed WSL2 on Windows 10 was the way mentioned in the article ("wsl --install"), and ditto for using the new/experimental Linux GUI stuff.
This was readily available for anyone who bothered to install an Insiders ISO, and there are tutorials and articles about this for Win10 specifically:
https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10
https://devblogs.microsoft.com/commandline/the-initial-preview-of-gui-app-support-is-now-available-for-the-windows-subsystem-for-linux-2/That is a big no from me. I am not interested in being Microsofts unpaid alpha / beta tester, when I get in return in a less stable operating system and some unfinished bits.
I hate how Microsoft keeps running huge blog campaigns about this or that new features and once you dig into it "Just install the Insider ISO".
No. Tell me when you are done developing and it is ready for production.
Maybe a clean install would have helped, but screw that.
Anyway, it's not just "wait 6 months".
The disclosed changes to Windows 10 that comprise "Windows 11" sound non-critical, like Firefox changing its UI for the umpteenth time without ever disclosing underlying reasons: https://en.wikipedia.org/wiki/Features_new_to_Windows_11
well it's been in Windows insider builds for some time.
That’s like saying my crappy economy car can win races because I could install a new engine. Sure it’s available to me already but that doesn’t mean I always want to go through the effort to get there.
Got the new Surface Studio Laptop two days ago and am very happy with it.
Does anybody else remember that?
Means if code resides in the linux vm and you can somehow edit it directly (eg: VSCode + WSL2 plugin), it's fast.
https://www.phoronix.com/scan.php?page=article&item=windows1...
They don't account for disk performance when accessing Windows storage though. If you stick to wsl2 storage paths performance is great.
--enable-features=UseOzonePlatform --ozone-platform=wayland
There are issues raised on github (issue #272/273) so I'm guessing it's mostly driver related. Other than that it seems fairly seemless, the apps appear in an ubuntu folder on the windows start menu.
Now that it's live I'm very reluctant to do this again and have to set everything up again if it fails. Though I suppose I can just pull an image off it...
https://answers.microsoft.com/en-us/windows/forum/all/cant-e...
They redesigned it as a VM (WSL2) because of compatibility and performance issues.
It wasn't entirely clear from from the article, but I hope these updates fix that.
There’s a feature request for including it foe Windows 10: https://github.com/microsoft/wslg/issues/414
I don’t get the appeal personally, but some people like Microsoft I guess.
Don't recall the name any longer.
It's not as good as running Debian directly. WSL2 was the motivation I used to switch to debian full time on my main development machine, so I'm not sure Microsoft can safely assume that having WSL2 means people won't dual boot or simply move on.
WSL2 + VSCode w/ WSL plugin provide a fluid and fast experience if the code sits inside linux.
I’m really, really happy with WSL since I can use one powerful PC for work, music recording and occasional gaming.
You can also disable telemetry quite easily, if thats what you mean by “spyware”.
YMMV, of course.
At work, we support more than half the team on it. Company gave a stipend to build or BYOD, and a lot of folks opted for Win10 w/ WSL for gaming purposes (afaik, Wine didn't support anti-cheat in several titles until recently?)
For me, being able to confidently use any non-Apple device, have full driver support for touchscreen/wifi/speakers/etc. and maintain containerized development environments, is extremely attractive.
- Great scripting environment for a number of "used weekly/monthly" tools (stuff to test backups, automate some processes) Maybe this is more an indication of my lack of PowerShell knowledge to do the same.
- Good way for me to test most Linux binaries our scripts / code might use (wkhtml2pdf seemed to experience this, might have been because any windows bins we found were out of date/mislabelled.)
- Ansible "Controller/Host" , My god, my favourite usecase for WSL. It just works. Still have to deal with Ansibles bytespam errors, but you don't need a whole VM to just to update some servers.
Not sure what you mean by "man pages". The full Linux man system is there, of course. WSL itself has very few commands of its own. There's wsl.exe but you almost never use it. It has no man page per se but it does have a good --help string as well as online docs: https://docs.microsoft.com/en-us/windows/wsl/basic-commands
So I use graphical stuff in Windows (JetBrains Rider, VSCode, MS Office, Firefox etc), with all my dev files in WSL2. Works great, the vest of both worlds!
Previously I was using Git Bash on Windows, which actually worked pretty well too (apart from occasional file system path issues), but WSL2 takes it to another level.
Makes sense.
Don’t fall for this because you want to play video games.
On the desktop I care about applications more than I care about the operating system. The operating system should just not stay in my way, complicate things for me or consume my time.
You realize that's not the original well-known phrase?
same for IO intensive operations, including compiling code
just use linux or macOS
> I don't notice a significant difference between them
because you didn't, so i shouldn't?
nice!
But that's quite a lot of stuff to be considered "the only reason".
“the only reason people use windows is because of the things they use computers for”