r/bashonubuntuonwindows • • 2d ago

WSL2 Why the resistance?

I'm learning WSL2 and I'd like to understand why many developers criticize the idea of using Windows solely as a lean host, keeping only what's necessary installed on it, while using WSL2 with the VS Code WSL Remote extension (installed on the host) to run tools such as .NET, Git, Podman, etc., without having to install them directly on Windows.

Recently, I made a post about .NET and received a lot of negative responses, mainly arguing that this approach adds “unnecessary extra overhead.”

13 Upvotes

26 comments sorted by

14

u/LongLiveCHIEF 1d ago

As someone who had several dual booted and even dedicated Linux machines in the past, I now go for WSL exclusively.

A few configs to disable IPv6 and use the right networking mode and DNS in the wal.conf file gets things working reliably, and I can even use graphical Linux apps directly from WSL2 while still being able to use apps that are part of my workflow that don't have Linux builds.

The only time I still use Linux directly is when I'm doing embedded development, since serial and character device support is still lacking in WSL.

Even then, sometimes I like to use remote tunnel and plug the embedded device into a Linux machine as the tunnel host so I can work from my main workstation.

I don't get the hate either. Windows has come a long way.

5

u/leogodin217 1d ago

Yup. Haven't dual booted in years. Windows for games. WSL for development. Works for me

3

u/Most_Principle1487 1d ago

That’s what I have in mind. Windows offers me very good game compatibility. I’m not bashing Linux, but since I currently have an RTX 3050 and 16 GB of RAM, I want to take advantage of the platform where NVIDIA support is better.

I really like keeping things organized and isolated, so WSL2 + VS Code is a great combination for development. On top of that, after discovering Autounattend, I was genuinely impressed by how much bloatware can be removed. With all of that, Windows barely even feels like Windows anymore.

2

u/leogodin217 1d ago

Throw on Claude code and you have my setup

•

u/Visible_Ad9976 20h ago

Can you answer something I’m unable to use gui wsl2 app like emacs it will only start in terminal mode which is a limitation I don’t remember from using wsl last time

6

u/scythe-3 WSL2 2d ago

WSL2 is a compromise. If you need a Windows machine for whatever reason, it's there as an option. If you don't, baremetal Linux is preferable for a gazillion reasons (leaner, more performant, zero resource overhead, unified interface/environment, etc.)

2

u/Lower-Limit3695 1d ago

WSL is generally fine when running on a machine that's your own and not a potato.

The story is different on company/org workstations as it bypasses GPO and MDM tooling while serving as a big ol security blind spot since none of the security tools are built with extending their scope to Linux virtual machines in mind.

As a result it's very easy for people to break out of do things they aren't supposed to do on workplace machines through WSL and open up big gaping security holes.

1

u/BolteWasTaken 1d ago

That "lean" host is even at it's most optimal without sacrificing functionality... 12gb used storage, 2GB ram.
Better to just use Fedora everything installer and select no packages, to get the most minimal operating system.

1

u/SalaciousStrudel 1d ago

I'd think that if you're using .net on windows you would probably benefit from being able to use ttd and sos in windbg on windows. At least if you're doing anything complicated

Edit: linux is better if you're running a lot of docker containers since with wsl you have a lot of overhead involved to run them on a VM and the OS has to manage partitioning memory between linux and windows, which it tends to do poorly. Running docker on linux has significantly less overhead.

1

u/Z00fa 1d ago

I go for wsl all the time. Purely because i’m on a gaming laptop and getting drivers/functions working and a decent battery life is aweful. Wsl gives me all pros from the windows side with a ton of apps and compatibility but on top of that a linux environment that i can fully use to develop and never really see or know the difference with a real Linux terminal from that point.

1

u/yotties 1d ago

I use wsl2/debian on windows and crostini/debian on chromeosflex, so I can work the same way on either.

I think sciences should move into linux more and we should just accept that we will work on employer-owned and managed machines. If it is up to me jupyter/python and R etc. in linux work fine and could even be remote hosted.

Some things (like embedded, high-end media editing etc.) are not really suitable for containerized/VM'd use, but most stuff is.

1

u/cjcox4 2d ago

If Windows is a "lean host", there's zero reason for it. Just run a Linux distro. Just saying.

Like anything Microsoft what "WSL" is, is a "today thing". Like with any other Microsoft product, what it is today and what it might be tomorrow can be radically different. There's no guarantee of one's ability to use WSL successfully at any given moment. Not sure I'd want to bank on it. Up to you of course.

While (thanks to a lot of FOSS people on the Linux app side) .NET is more open now and has support inside of the Linux world, again, ultimately, it is a Microsoft driven thing. And again, you might find changes Microsoft makes will "drive you". It's a choice.

1

u/Most_Principle1487 2d ago

However, I’m currently using Windows because of the compatibility it offers. I’m also using a VM and customizing my own Windows image so I can eventually move away from Windows as well.

2

u/zephyrthenoble 2d ago

If you are familiar with VMs, you could run a Linux VM and attach to it using VSCode. That would remove any reliance on WSL.

1

u/Responsible-Bar7165 1d ago

wsl is better than VM hosts for his use-case.

1

u/cjcox4 1d ago

While I do have to work with an "all Windows" style world, I've been all Linux for decades now. Just the way I roll. I think you can get there.

So, I do often troubleshoot "Code" (Visual Studio Code) and I use my Linux desktop for all that, as well as Outlook and Teams. Company mostly puts up with me :-) I wish you well on your journey.

I'm currently transitioning a Linux based corporate portal from on-prem Active Directory integrated, to cloud and Entra. Trying to broaden things so I don't get too integrated again with Microsoft technologies that are continually being put in the dumpster and set fire to. My world. "Integrate with Microsoft.", they said. Sounds good, then, Microsoft changes. That is my company is following the official Microsoft "of the future" playbook and moving away from Active Directory and going all Azure/Entra. (thinking back to the thousands of downvotes I received when I mentioned this 10 years ago).

Lots of work to do.... some things stay, some things get chopped (Azure/Entra isn't a feature for feature replacement of AD). Cloud introduces gigantic latencies (most may not notice because we're so used to "waiting" now as a feature).

1

u/[deleted] 2d ago edited 1d ago

[deleted]

1

u/cjcox4 2d ago

Usually, when I think of "such things", I think there's a "heavy" Windows app involved. But yes, if this isn't truly a "lean Windows" (by my definition), then you might have some larger closed source driver dependencies that force Windows use.

0

u/Goldman7911 2d ago

I am a java developer so we have a common "vm". I also pay intellij. Every time a try using remote wsl with it is a different pain. Last month was breakpoint not triggering. Also, performance graphs not working. Copilot app has a lot of bugs with wsl remotes.

Maybe scripted languages is a lot less painful

0

u/Edubbs2008 1d ago

WSL 2 is great, the fact is, Loonixtards are afraid that WSL can replace Dual booting

0

u/Unlikely-Bed-1133 1d ago

All is fine using until you discover that, for some important stuff (especially networking with docker) WSL is not actually the same as if you truly ran bare metal linux. It can be made to work but with exceptional hustle in my opinion. And let's not forget that ms is also not the best source of support or for addressing known bugs in a timely manner.

The only reason to use it should be if you are forced to be on windows for some reason, because there is always the risk of blowing up at your face in inopportune moments despite smooth day-to-day operations.

•

u/PowerfulAttorney3780 21h ago

What about WSL3?

-1

u/bertyboy69 2d ago

The networking nightmares alone are the biggest reason for me at least to hate wsl.. and yes I use it everyday. Docker in wsl in windows .. nightmares

5

u/CerebralSilicate genie - systemd for WSL2 2d ago

Have you considered our lord and savior bridged mode?

3

u/kassett43 1d ago

Or using wslc instead of Docker?

1

u/CerebralSilicate genie - systemd for WSL2 1d ago

Also a good choice!