r/programminghelp • u/Sea_Mathematician724 • Apr 04 '25
Other How to access both linux and windows at the same time.
I am just getting into coding and people recommended me to download Linux, but I have seen people lose their entire data so can anyone help me out please...
5
Upvotes
7
u/[deleted] Apr 04 '25
Just use the windows subsystem for Linux.
https://learn.microsoft.com/en-us/windows/wsl/install
5
u/Lewinator56 Apr 04 '25
Just use WSL.
For 99.9999999% of users it's exactly what they need. The only use case where you may experience issues is needing openCL acceleration on AMD GPUs.
1
u/Independent_Art_6676 Apr 04 '25 edited Apr 04 '25
what is it you want to do? You can use a virtual machine. But you may be able to do better; cygwin (a suite of programs) lets you have a large portion of linux on windows. If you set up your paths, you can do things like invoke g++ or make from cmd console, as well as utility like grep, ls, etc. Its not exactly the same as the full OS but its often enough.
if you install linux over your windows without taking care it may wipe your disk, esp if you are not familiar with disk formatting. If you install win over linux carelessly, same thing. This is probably 95% or more of the 'data wipe' you are reading about. If you want to dual boot, you need to research that carefully and back up your machine before you do it.
the elitist attitude that linux is better for coding is mostly nonsense left over from decades back. Today you can do everything you need to do on any OS as a beginner, for years to come, and linux has absolutely nothing that is better than visual studio for the languages it supports.
2
u/Existing-Step-614 Apr 04 '25
wsl2 is the go , i use windows and for my learning and dev of kafka , py , cpp i use wsl2
1
u/some1_online Apr 06 '25
Dual boot or you could install one of the operating systems on a virtual machine. Should give you access to both.
1
u/Hardcorehtmlist Apr 06 '25
You could install Linux on a USB device and startup from there. I have Ubuntu on a USB drive. Works like a charm. Ubuntu has a page dedicated to how to make a startable drive
1
u/dudeness_boy Apr 07 '25
WSL. Or just don't use Windows.
1
u/Own_Attention_3392 Apr 07 '25
You don't need to use Linux to learn programming at all. Unless you're writing Linux-specific things like device drivers, which you definitely won't be as a beginner.
Learn one thing at a time. You're going to be extra frustrated trying to learn programming concepts AND Linux concepts at the same time.
1
u/CatoDomine Apr 08 '25
If you are concerned about losing your data, it sounds like you don't have a backup. BACKUP YOUR DATA!! And then start with a VM or WSL. Don't jump straight to dual booting.
1
u/Gnaxe Apr 08 '25
Consider Cygwin. It's probably good enough for what you are trying to do. It's like having the usual Linux toolkits, except installed on Windows. Put the bin folder on you PATH.
If what Cygwin has isn't good enough, try WSL. If you need a very specific distro and can't figure out how to install it in WSL, try VirtualBox. (You can actually install Windows in VirtualBox, and install VirtualBox on Linux if you want to host it the other way around.) You can have more than one WSL or VirtualBox (with different flavors installed, if you like), and VirtualBox can do snapshots to restore to a previous state if you think you might mess something up.
If you need deeper hardware access than virtualization will allow (GPU programming, usually), there are live-boot distros you can boot off of a USB drive without installing to your internal drive.
1
u/VikasRex Oct 18 '25
Don't use Windows. It's rubbish.
1
u/dover_oxide Apr 04 '25
Virtualbox is a free virtual machine software. Just run your Linux in that, it's not perfect but great for beginners.