DEV Community

Alex Gwartney
Alex Gwartney

Posted on

Windows vs linux?

So I wanted to create a short post here and get some opinions from the community. Since I have gotten back to the web dev game I have been looking into what was a better OS to make my workflow faster.

I originally used to use a mac and have found that it was great for my development environment. But I have since moved back to windows and have found that well it lacks a lot of stuff. And is a huge pain when it comes to the command line and being able to install things.

Which brings me to my topic I have started using Linux on my laptop as a test. As I have found that the command line and the ability to install things on it is just night and day. For setting up a development environment. But It comes with the drawback of having to go the extra mile of running wine to use certain windows programs ect.

So my question to you all is which do you prefer. Also is there a way of setting up a fast windows environment to get a similar cmd?

Top comments (66)

Collapse
 
elabftw profile image
eLabFTW

I wouldn't touch Windows with a stick for anything related to dev.

Only gaming on Windows, that's it.

Collapse
 
alexgwartney profile image
Alex Gwartney

That's what I really have found at this point as well. The only real-time it is useful is if I am doing game programming.

Collapse
 
johnphamous profile image
John Pham

I'm curious to understand why you have this opinion. What are some pain points you find developing on Windows?

Thread Thread
 
shaunagordon profile image
Shauna Gordon

Some of the things I've run into:

Shoddy support for typical command line utilities. This has gotten better in recent years and ostensibly with WSL, but it still feels like "swimming upstream."

Almost no Docker support.

Almost no centralized package/software management. Chocolatey the closest and that requires opening a pretty big hole in PowerShell for relatively limited benefit.

General, overall instability and intrusive updating (I get needing to, and that's fine, but being forced to and forced to restart is a non-starter for me).

Thread Thread
 
elabftw profile image
eLabFTW

Basically, when you're using gnu+linux you feel that everything is made for it. Everything is simple and works out of the box. When you're doing that on a mac, you have to fiddle a bit, fight against outdated mac os libraries and utilities but you can get there, as you have a terminal and a bsd like system. On Windows, you never stop fighting the OS. Line ending? Different. Folder separator? Different. BOM? Different. Let's take git for instance, on Windows, when you install it you have to make choices about the line ending of the local and remote files and other weird options, whereas on linux it's as it should from the start. Also, package management is just not really there for windows. Compiling some software on linux is very easy, on windows you'll have to fight the compiler and other things.... Well, you see the picture...

Collapse
 
manuelojeda profile image
Manuel Ojeda

Well here is my opinion.

I have been doing web development both front and back since 2015. Since then I was using Windows as a main platform without any issue only the boot problem that is having a bad performance over time.

Now that we have Windows 10 and the awesomeness of WSL (docs.microsoft.com/en-us/windows/w...), you can use a emulated Ubuntu local machine running inside Windows and you can use everything as your OS terminal were Linux instead of Windows.

The main issue with this approach is that with overtime both WSL and Windows performance going badly, in my experience I had my Main PC which is a gaming one with SSD and everything and after few months the performance went really bad.

Of couse you can use mostly of tools nativily (NodeJS, PHP, Git, etc etc) but you can be messing some stuff that only works with Linux and OSX because of UNIX.

At this time i'm running Ubuntu as development enviroment and I don't have no issues. As a personal tip I recommend to you to use any Linux distro of our preference natively instead of having any emulation of any kind (Docker, WSL, etc, etc) The performance it will be really great.

Collapse
 
mburszley profile image
Maximilian Burszley

The main issue with this approach is that with overtime both WSL and Windows performance going badly, in my experience I had my Main PC which is a gaming one with SSD and everything and after few months the performance went really bad.

Having used both since they went GA, I have no idea what issues you've seen over time as I do not share that experience. And with WSL2 (currently on insiders), I also do not see slow system resource access anymore either.

Collapse
 
manuelojeda profile image
Manuel Ojeda

I forgot to mentioned why I left Windows definitly. I'm mostly PHP developer (a fullstack dev) so I had Laravel Valet running in WSL and 90% of times had issues of 502 errors from ngnix and the point it was annoying and the best approach was using a native Linux distro.

As I saidm if you are using WSL for JavaScript development it will run smoothly without any issues 👌

Thread Thread
 
mburszley profile image
Maximilian Burszley

What issues did you run into with js? Most anything with node_modules was resolved years ago and the pnp thing with yarn is pretty sweet once tooling support is up-to-date.

Thread Thread
 
manuelojeda profile image
Manuel Ojeda

With Node and JavaScript none.
My issue were with PHP, I was using Laravel Valet WSL as a virtual machine host to have a local PHP dev env without to much steps.

As I sad, with JS there is no problem using WSL

Thread Thread
 
mburszley profile image
Maximilian Burszley

It's just confusing you conflated WSL with JS when it works just fine on Windows as well.

Collapse
 
jhechtf profile image
Jim Burbridge

I use Windows for development on both my desktop and laptop.

I've found that most things are not that bad to work with on Windows, and anything I simply can't get done using Powershell I simply use the Windows Subsystem Linux (WSL) for it; e.g. I simply do not remember the command to delete an entire directory for powershell, but I can just do the following:

PS C:\Users\your-user> bash
user@your-machine:/mnt/c/users/your-user$ rm -rf some-folder
user@your-machine:/mnt/c/users/your-user$ exit
PS C:\Users\your-user>  

Anything beyond that I tend to use Docker (and Docker Compose) for. I installed Ubuntu on a partition of my laptop's mechanical HD and while I don't mind using Linux, I also tend to like to take breaks and play a game here or there, which is just easier for me to do on Windows than it is on Ubuntu.

But really, whatever you find easiest is likely the best option. If you enjoy using linux for your dev setup, well enough people agree with you that Dell offers an Ubuntu based XPS computer (way too expensive imo, but it exists). If I could, I would likely use some Linux distro or another for my work computer as well, but unfortunately they make us use Macbooks.

Collapse
 
jhechtf profile image
Jim Burbridge

One caveat I forgot to mention: I use Chocolatey to shortcut some of the usual headaches that come with Windows development. I know people use Scoop, but I found chocolatey first so it's what I default to.

Collapse
 
redoxeon profile image
Michael Harding

I found that when I tried to go to linux, my productivity screeched to a halt. Not because I couldn't figure it out or got stuck, but because I had way too much fun customizing every last inch of the desktop environment and my dotfiles. I had to go back to windows for the sake of my productivity.

Luckily with the new Windows Terminal and using WSL, I can get just enough terminal customization and linux command line features that I don't feel like I have to install linux, and I don't waste my whole week trying out new window managers and things.

Collapse
 
themobiledev profile image
Chris McKay

I used to use Linux exclusively for a couple of years. I had the exact same problem. Change an icon here, switch this theme, move my projects to this folder, try this new distro, etc. When Windows 7 came out, I made the switch back and have been on Windows pretty much ever since. I keep checking out the latest Fedora and Ubuntu releases, but I haven't been able to bring myself to switch back.

WSL is pretty good. As soon as WSL2 is available to me, I'm switching it to for all my web development.

Collapse
 
zanehannanau profile image
ZaneHannanAU

I find it a little funny that I had the absolute opposite experience.

On windows I always installed Clover or something

I always was "fighting" the system. And when the system didn't like it, it changed it itself and everything broke,

It always felt weird.

After switching to Linux (through a netinstall) I've honestly barely been bothered by any part of it. Yeah, having more games to play would be nice, but half of my steam library is supported, and those that aren't... well actually I couldn't play half of them before anyway. It's the same PC, running a different OS. That's it.

Collapse
 
host510 profile image
Mikhail

State-of-the-art IDEs are made for Windows. I mean if you are using technologies not obsolete you are happy with Windows. And Linux makes you do a lot of extra stuff to make many tools work.

Collapse
 
bonfacekilz_67 profile image
BonfaceKilz

What dev tools are these? Pretty much most tools just "work" in Linux. And speaking of IDE's I've been using Emacs for over 4 years now and I'd call it "state-of-the-art". All the popular IDE's should also have good support too. What tooling made you dislike Linux(except .NET stuff)?

Collapse
 
sfarkas1988 profile image
Sandor Farkas

Hey, I use both systems right now and I have more issues with ubuntu than with windows. Anyways both systems have pros and cons. But honestly, windows made a great job to be usable for web development. WSL just works, I don't have any performance issues. I liked this article when I've set up my system the first time: seld.be/notes/developing-on-window...

One thing I don't like but it's a self-made problem:
I've many ways of running a web project: Docker, natively, WSL
And now sometimes I've to search the right place when I didn't touch my project for a long time. :D

Collapse
 
mburszley profile image
Maximilian Burszley • Edited

In the past few years, Windows has made leaps and bounds improvements and with containerization, I would just say use your preference.

I like Windows since my main hobby is PC gaming; I use WSL2 when I need Linux, and I use Docker and friends when I need to deploy.

My recommendation for getting into things, learn WSL (not very difficult since they've put a lot of effort here) and get Windows Terminal. Also, if package management is your issue, check out Chocolatey.

Terminal and Linux distros for WSL are hosted on the Microsoft Store.

Collapse
 
vypxl profile image
vypxl

That's the thing with Windows for me: Everyone is trying to emulate Linux behavior on Windows because it's practical. These tools are fine and I use them too when I quickly need to ssh somewhere for example while I was gaming on my Windows. But why not just use Linux, where one does not have to emulate anything? No one wants to emulate Windows behavior, just sayin'.

Collapse
 
mburszley profile image
Maximilian Burszley

Because people want their OS to work. I don't need linux emulation; I have it natively now.

Collapse
 
moopet profile image
Ben Sinclair

I installed Chocolatey the other day because it's the distribution method for VSCodium.

It's a hassle to install and even following the instructions I couldn't get it to work after closing and opening the terminal. I assume it puts something in the path but doesn't configure the global PATH setting, but that bit's not documented.

Seems pretty rough compared to more mature package managers.

Collapse
 
mburszley profile image
Maximilian Burszley • Edited

It's a hassle to install and even following the instructions I couldn't get it to work

What? It's literally curl site.com | bash level of install from an elevated prompt. They even have a copy/paste option in their docs:

chocolatey.org/install

Thread Thread
 
moopet profile image
Ben Sinclair

Yeah, it didn't work for me. Rather, it installs, but since it's not in the global path, if I open a new terminal, it's not available. I could fix this easily enough, I guess, but the fact that it doesn't work puts me off.

Collapse
 
1e4_ profile image
Ian

I started on Windows when I first started working with PHP and it was fine. but then little things started nagging me, Ubuntu shines because it's so hackable, you can make it your own, with Gnome tweaks as well.

I do however duel boot Windows and Ubuntu - Windows is only ever used for Steam simply because gaming still isn't there on Ubuntu for me.

Overall, Ubuntu smashes Windows and MacOS out of the water, very comfortable to use.

Collapse
 
jimpriest profile image
Jim Priest • Edited

FWIW Linux 100%.

I had a Windows machine at work and while WSL is headed in the right direction it's still hit or miss IMO. Plus if you are in a corporate environment there may be issues out of your control in regards to antivirus and what version of Windows you are on... (it will probably be awhile before they roll out the latest Windows w/WSL2 in our office)

I then switched to Mac thinking it would be better but it's honestly just a different set of problems :)

At home I have been using Linux for a long time and maybe I'm jaded but I just don't have any issues with the latest distros. Most things run in browser these days, for dev work it's all in Docker and if I need Windows I can easily crank up a VM.

Collapse
 
mat735 profile image
Mat

I have switched between all three OS's during the past 20 years. I gave up on OSX a few years ago except for iOS development. Too many bugs/breaking changes with every release.

I am using Kubuntu on my laptop and I love it but battery life is not as good even after proper configuration/tweaks (TLP, etc). KDE is the only DE that does display scaling properly so forget about elementary or gnome. If you are using a mouse, good luck getting scrolling to work properly without trying tons of third party tools and hacking config files. It boggles my mind that linux doesn't let you adjust the scrolling speed at this point. This was the deal breaker for me on desktop.

I'm using windows on desktop with WSL, but over time I have used WSL less and less. With things like chocolatey installation is a breeze. If you have performance issues in WSL, make sure to exclude the linux directories from windows security, the same for dev project files. This will make a HUGE difference.

I have no problem doing development switching between my linux laptop and Windows. cross-platform tools have become mature and it makes no difference. Interesting note: one of my projects is using dotnet core and I use windows for dev, a mac mini for building, and deployment to linux containers!

I reinstall any OS at least once a year and use installer scripts to configure everything. This keeps it fresh and snappy.

Collapse
 
mrgkanev profile image
Gabriel Kanev

Personally i have both systems on my work pc(2 ssd 2 hard drives). One os has one of each and i think this is the best way for now. I work mainly on Linux (manjaro) and when i have something to do connected with university or office work (we have problem with open office standards on some printers) or image editing.

Collapse
 
dbroadhurst profile image
David Broadhurst

I'm a long Ubuntu user that had no desire to switch to another OS until WSL2. WSL2 is a game-changer. Few minor snags but the overall developer experience is excellent. Windows 10 + Linux Kernel is the sweet spot.

Collapse
 
theothertimduncan profile image
Tim

I agree with Manuel and will also throw in that the new Windows Terminal may give you more of what you may be used to with Linux. Scott Hanselman has some good stuff on Windows Terminal and on using WSL. Start with hanselman.com/blog/ItsTimeForYouTo....

Collapse
 
moopet profile image
Ben Sinclair

Windows terminal is ridiculously slow and buggy still. I mean it's orders of magnitude slower than a decent terminal from 15 years ago - a simple cat of a file that scrolls for 100 screen heights will take a fraction of a second on a conventional terminal and 30 seconds or more on Windows Terminal. That kind of update rate makes everything laggy and annoying.

Also... also it crashes a lot and has a lot of half-written features.

I know it's "alpha", but kids make terminals for a laugh in a weekend that are better than WSL's.

Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga

If you really need those very specific Windows applications, I'd honestly say, just stay on Windows and use Docker for development purposes. You'll have Linux inside of those containers. At work I use Docker for everything and it works flawlessly between a mix of different operating systems.

Now if you can find great alternatives for those Windows programs, I'd 100% recommend you switch to Linux. I personally don't miss anything that I had in Windows and all programs I did use are also available for Linux. Well except the Adobe products of course, but there are great alternatives.

Pick the workflow and systems that make you most productive and try not to let the Linux enthusiasts (I'm one of them) convince you that you have to switch because it's great and Windows sucks. Your workflow is yours and yours only.

Collapse
 
susickypavel profile image
Pavel Susicky

From my point of view is Windows mature enough for quality development environment.

I have come through a lot of different setups beginning by Windows itself, Windows subsystem for Linux (WSL) and Linux itself. I'll start with the WSL version.

WSL is very nice tooling, it brings you the emulation of almost all famous distributions of Linux inside Windows. However, its main disadvantage is in I/O operations which are extremely slow (installing dependencies using npm or yarn takes forever) and I couldn't get over it, so I abandoned the WSL.

Linux itself is perfect for development, I didn't have any terrible issues with it and it's incredibly fast. Possibly it seems like a utopia, but later I've realized that I need a lot of applications and stuff for school based on Windows, so once again I needed to switch to Windows because I couldn't get them working using Wine for Linux.

So finally I stick with Windows and here are reasons why:

  • I have a high-end desktop computer so there is no need to worry about performance.
  • Windows Terminal is an awesome terminal, where you can have many tabs in a single instance of the terminal and the main advantage is you can have the WSL shells integrated inside of it, so I can quickly switch between my PowerShell and f. e. Ubuntu shell.
  • I found a way of styling my Powershell so it looks like a Zsh (oh-my-posh and posh-git)
  • Found Scoop which is a very handy tool for installing Windows-based software using the command line.

Conclusion

If you have a desktop computer and a laptop, I would install Windows on the desktop and some Linux distribution of your choice on the laptop (laptops are less performant in general, so Linux is a great choice).

In general, ask these questions:

  • Do you need to save performance? (because of low-end computer etc.)
  • Are you more productive with Linux tooling such as shell?
  • Do you need your computer for other software that is exclusively Windows/Linux based (you can still go for dual boot 😉)?
Collapse
 
moopet profile image
Ben Sinclair

Oh, scoop looks more interesting than chocolatey!

Not trying to install everything as admin is a definite plus.

Collapse
 
yokotobe profile image
yokotobe

i love linux as it is same as with my server, so I can run the same scripts easily on both local and remote environment but when I need to use graphics software, Adobe has no choice to Linux then I moved to MacOS as it is Linux based and stable than Windows (Win7 and 8.1 at that time). After Microsoft introduced WSL. Here is the reasons why.
・ It can run Linux with less resource, no need to use Virtual Machine like VMware or Virtualbox.
・ Visual studio code has extension to connect to WSL very well
marketplace.visualstudio.com/items...
・ There are plenty of graphics and video editing on Windows platform
・ Windows10 is very stable, no more BSOD
・ Cheaper hardware are avaliable to use and customize but be careful with hardware and software compatibilities. You can not blame Microsoft, if you choose not to use a certified ones.