DEV Community

dvd
dvd

Posted on

WSL, am I missing the point?

I recently got a new Windows laptop for my personal learning/side project stuff and dutifully setup WSL2 with ubuntu because that's what the internet wanted me to do. The process was relatively pain free but took around 2 hours and now I have a slightly more complicated way of doing all the things I could do before.

I am a frontend developer, I write in Vue and a little react, I want to experiment and learn but I can't for the life of me figure out what WSL is doing for me.

I'd love to hear from you guys about what this technology can offer me as right now I'm a bit baffled

Top comments (9)

Collapse
 
thefern profile image
Fernando B 🚀

It's a little more complicated than just using the terminal and using cli's. Linux gives you a "server environment" close to what a production server would look like. And certain things that cannot be done on windows, can easily be done on Linux. That's the main purpose of WSL gives Windows users a quick Linux machine without using virtual machines. The things you've described using npm, and git those can be easily done on cmd prompt without WSL.

Collapse
 
thefern profile image
Fernando B 🚀

Long story short, WSL gives you linux on windows without you having to deal with virtual machines, and WSL provides a nice interconnecting layer between Linux and Windows. That's it, if you don't need Linux for any of your development then you don't need WSL.

 
thefern profile image
Fernando B 🚀

I think your comments contradict themselves.

It only matters if you do most of your stuff inside a terminal anyway. If you start your npm/yarn run scripts from inside your IDE you most likely won't need WSL. If you use a Git GUI or use an IDE feature to commit and push to Git you most likely won't need WSL.

You can use cmd prompt and do everything there without the use of WSL, your above comments make it seem like if you use terminal, you definitely should be using WSL. There are tons of people that use GUI editors, and still use cmd prompt for git and npm.

There are quite a lot of differences between OSes, but for your avg developer that doesn't see much sysadmin it really won't matter much as long as they got a good development setup.

I think the only really good reason to use WSL2 layer is if your job requires server setup/test, and your job gives you a Win10 laptop or you like using Windows, in that case yes you need to test in an environment as close to production.

I'm really curious for a list of things you can't do on Windows to be honest. Nowadays there's very little difference in terms of capability between any operating system / distribution.

Agreed, you can do pretty much all major tasks in any OS, just really comes down to user preference and how much productive are in that OS, this does make sense. : )

 
thefern profile image
Fernando B 🚀

Ok, we'll just agree to disagree. Npm and git are literally identical on cli Win/Linux, I don't understand how WSL would make neither better. I don't see how WSL would make it easier especially since most cli's have a help command, but I am probably missing your point.

Collapse
 
dvd profile image
dvd

Thanks so much for the replies. I think overall as a technology it's probably an unnecessary complication for me but I guess I'm glad I took the time to set it up for the edge cases when I might need it

Collapse
 
varoondev profile image
Varoon S

Wsl2 is awesome, vscode + wsl .Just like working on Linux now I don't have to use vm or dual boot.Run code in development close to production

Collapse
 
thefern profile image
Fernando B 🚀

Yup you've hit the nail, I'm a linux user but I've seen videos of WSL and I must say it's nice. You can even browse Linux directories with windows explorer, it is quite crazy if you ask me how much Windows has embraced the Linux movement.

Collapse
 
adamcoster profile image
Adam Coster

I mostly use it for Docker on Windows, and otherwise because I like having my dev environment more closely reflect production, since a lot of my code ends up on Linux servers.

Collapse
 
bugs_bunny profile image
Derek Oware

WSL is basically giving you some Linux features.

Now with WSL, most tools and packages can be downloaded with apt-get and that's the best part.