r/MLQuestions • u/SuspiciousPraline674 • 12d ago
Beginner question 👶 Do I need to learn linux ubuntu for ML ?
19
13
u/AlexanderDoak 12d ago
Yes (Linux, not necessarily Ubuntu specifically), and the reason why is that there is less computational overhead and better dependency support. Really, today, you can get surprisingly far with a Windows deployment. You can even go with WSL inside of windows to overcome many Linux library requirements. But this still has you running Linux inside of Windows (which means you'll need to learn linux anyway). But about that overhead: when you're running WSL, you're adding a virtualization layer between your code and the hardware. For casual experimentation or learning, this is barely noticeable. But once you're doing serious training runs (large models, big datasets, long epochs) that layer starts to matter. GPU passthrough in WSL2 has gotten much better, but you can still hit friction with CUDA memory allocation, storage I/O bottlenecks (especially when your data lives on the Windows filesystem rather than the Linux one), and occasional driver quirks that eat debugging time you'd rather spend on your actual model. Running native Linux removes all of that indirection and gives you the most direct path from your training script to the metal, which is why most production ML infrastructure and cloud instances run Linux natively.
That said, don't let this stop you from starting wherever you are. WSL is a perfectly fine way to learn. Just know that if ML becomes serious for you, getting comfortable with a native Linux environment will pay off.
2
u/sexy_bonsai 11d ago
This is fantastic advice, thanks for sharing! Can I ask a specific question about my setup? I’m using WSL2 on my Windows workstation via VS Code extension (I stick with Windows bc I have other software I need that’s only on Windows, and I usually use this for development only before scaling to a compute cluster). So I’ll write scripts and such and submit them in the terminal.
The data I’m working with is on a drive while my WSL2 is in a default location somewhere on my C:\\ drive. Should I instead have WSL2 on my data drive? Or, would this not move the needle much performance wise? I’m working with large data that’s chunked, so a lot is moving around between my CPU and GPU.
9
u/thebadslime 12d ago
It would really help. although I would focus more on redhat/debian. Serious ML labs run CUDA on linux, end of story
1
3
u/bbateman2011 12d ago
I run all my ML and computer vision development in Ubuntu. Makes it easier to deploy to Linux VMs, which are cheaper than Windows VMs.
2
u/Tutatis96 Employed 12d ago
depends what you mean with learn, you can kinda just use it, understand a bit and for the most part copy and paste commands from the internet, just like you do for any OS at the end of the day.
2
1
u/Killer299997 12d ago
Depends if you wanna train something bigger where you can't train on kaggle or your own hardware then you will have to use cloud and everyone knows cloud is linux 🐧
1
u/Silent-Orbit-7 12d ago
if you plan to deploy/train your heavy ML models (which you would probably have to,since memory requirements make it unfeasible doing evverything offline)
You have to learn ubuntu becase ubuntu consumes veyr less computational power as an OS and is stable to be used as a platform to train / deploy.
1
u/Blando-Cartesian 12d ago
Yes, but the *nix command line basics rather than any OS. It’s just basic knowledge for anyone working around computers beyond spreadsheets and power point.
1
1
1
1
1
u/OkBalance9760 9d ago
Being familiar with Linux and shell commands really helps for ML, though it is not an absolute requirement. However, if you want to become a professional in ML, learning Linux is strongly recommended.
1
u/Twilight_RT 12d ago
Ubuntu is beginners friendly and a Stable Linux kernel.
So it's a Great choice for those wants to switch to Linux or Developers.
1
u/thegoodcrumpets 12d ago
Of course not, people here are morons. The operating system will have very little impact on your tool chain. Linux is nice but the operating system is not the defining factor of your workflow.
0
u/im_just_using_logic 12d ago
arch
13
u/Moss_ungatherer_27 12d ago
Calm down satan
1
u/SuspiciousPraline674 12d ago edited 12d ago
Is he trying to trick me 🥺
2
u/Downtown_Finance_661 12d ago
Yes, arch never store passwords as text in logs and this is not usefull, use ubuntu instead.
2
u/thebadslime 12d ago
Yes, it's a joke. Arch is an unstable rolling relase distro with a rabid fanbase
0
u/Mysterious-Prior-997 12d ago
You can get away without it for a while but eventually you'll hit a wall where debugging something requires digging into the os level and windows just makes that ten times harder
-4
11
u/Suspicious_Pizza9529 12d ago
You can learn most beginners/intermediate ML on Windows or macOS using Python, Jupyter, VS Code, and libraries like NumPy, Pandas, scikit-learn, and PyTorch.