HACKER Q&A
📣 shivc

Linux vs. Mac vs. Windows for Programming, Deep Learning, AI, ML, DS


Mac works out of the box but then linux has its advantages and so does windows. Which OS do you prefer and why?


  👤 wkat4242 Accepted Answer ✓
Linux for me. Mac is way too expensive especially if you want lots of RAM which you need for most AI purposes. Windows is an ad-ridden spyware fest these days and you don't have control over updates and reboots. So both Mac and Windows are non-starters for me. I played a bit with things on windows but I'd never use it for something serious. Microsoft invests a lot into their AI tooling now but I don't want to be beholden to them. I have to deal with them at work but I don't trust them.

I built a Linux server for AI LLM inference with a Radeon Pro card and it was really good value for money. It took some doing to get it working especially with the lesser AMD compatibility but I saved a ton of money not buying Nvidia and it performs excellently now.

Windows probably would have been easier to set up but I consider every configuration problem a learning experience and my freedom is worth more than my time.

The reason the Mac is so popular is that it's the only way to get a GPU with direct access to tons of memory (up to 192GB) and it's cheaper than Nvidia dedicated AI options. But both have astronomical costs not justifiable to a hobbyist like me.


👤 cpach
Question to OP: What do you see as the primary benefits of Linux compared to macOS? Do you ever feel that you would miss a broader selection of proprietary applications? If I switched back to Linux again (after eleven years) I think I would miss nice Mac applikations, like the Acorn image editor. But maybe these days there are not too many applications that I would not find a good alternative for.

👤 tkuraku
Linux all the way.

Mac doesn't support Nvidia cards.

Windows just feels sluggish compared to Linux.


👤 ActorNightly
You should phrase your question better. " for Programming, Deep Learning, AI, ML, DS", is incredibly generic and encompasses a whole shitload of things.

I mean, I prefer windows because it lets me run all software, from everything linux (including graphical apps) under WSL2 to all the windows specific software like CAD and DJ software.

But if for example you wanted to train llm models in any reasonable time, you need to spend some dough on a dual 4090 (or upcoming 5090) setup at a minimum, which will likely just be a linux server that you ssh into from a different machine (cause you don't want to use the graphics cards for rendering).


👤 leejoramo
The software you create will typically run on systems that are very different from your workstation.

The systems your software actually runs on will typically either be much more or less powerful. Compare a large data center or embedded audino to system on which you type code.

Therefore my answer is use the Software and OS that you are most productive as a Programmer for your development system, and consider the deployment environment separately.

-- Now my personal answer...

I have used computers since the early 80s, and a professional programmer since the mid-90s. I have used many operation systems over the years: TRS-DOS, MS-DOS, CP/M, OS/2, Solaris, etc. Today, I spend time daily using: Linux, Windows and Mac.

* My primary workstation is KDE Neon on Ubuntu

* macOS for mobile work and my personal life

* Windows mostly for SQL Server and Active Directory

* Multiple Linux Distributions and Windows for Servers

While I like KDE very much and it is what I use for current my job, I am personally MOST productive doing Development work when using macOS as my Desktop Environment and Linux as my servers.

I highly customize my Desktop Environment to fit my way of working. I find that macOS is the most customizable for me, followed by KDE. Windows unfortunately is a distant third. (For some added context, my basic AutoHotKey file for Windows is over 1000 lines long, so I am very familiar with how to customize Windows.)

I like macOS because nearly everything I could want runs on it, my Unix-style tools, highly polished GUI apps, MS Office, Adobe, (or the many better alternatives from small developers).

I also really like Apple hardware, especially MacBooks for notebooks. My high-end Dell Workstations are great, but I vastly prefer MacBooks for on-the-go.

Some people find benefit from running their Workstation on the same OS as their Servers. This can be a big factor for you. For me, I am deploying to Windows, Redhat-style or Debian-style Linux. I find the difference between Redhat and Debian to be about as significant as macOS's BSD. So I don't get an advantage of running one system.

I write a lot of code that never runs on my Developer system, but only on the various deployment environments.

For servers, I highly recommend using the stack recommended by your selected technologies. This tends to mean you will be running multiple server environments.

If you are asking this question, with some thought to limited funds, I would consider what are the advantages to you personally for a Linux Desktop Workstation vs a MacBook.

Hopefully I have given you some useful food for thought. And much success you your endeavors.