Ditching the Cult of Mac: Windows PC as a Dev Machine
Setting up a development environment on a Windows PC using Windows Subsystem for Linux (WSL2).
If you're learning to code, you've probably been told to be a 'real' developer, you need a Mac. The truth is, the demand for Mac isn't about the hardware—it's about its Unix-based operating system.
Modern development runs on Linux because the servers you deploy to, the cloud infrastructure you use, and most open-source tools are all built on Linux.
- The Best Solution: Install Linux
- The Second Best Solution: Windows Subsystem for Linux (WSL)
WSL changes everything. It's not an emulation or a compatibility layer. It's a full, genuine Linux kernel running directly and efficiently within Windows.
Try It in 2 Minutes
Ready? Open a PowerShell or Command Prompt as admin on your Windows machine and type this one command:
wsl --install
That's it. No ISOs to download, no partitions to manage, no drivers to hunt down. Windows handles everything, downloading and setting up the latest Ubuntu distribution by default. After a restart, you'll have a full-blown Linux terminal on your Windows machine.
You now have a real bash
shell and can sudo apt install
any tool you need. You get to keep your Windows apps, your games, and your workflow, all while running a first-class development environment.
Useful Tips
You can do much more than just run the default Ubuntu installation. Run these in PowerShell or Command Prompt.
-
Install Other Linux Distros
See a list of what's available: wsl --list --online
Then, install the one you want. For example: wsl --install -d Debian
-
Switch Between Distros (and Delete Them)
If you have multiple distributions installed, you can see them all with wsl -l -v
.
To set a different distro as your default (the one that launches when you type wsl
):
wsl --set-default <DistroName>
If you want to remove a distro and all its files completely:
wsl --unregister <DistroName>
Warning: This is permanent and will delete all data inside that Linux distribution.
Next Steps
Now that you have a powerful Linux environment, it's time to use it.
-
Get Comfortable in the Terminal
Spend time learning the basic Linux commands. Practice navigating (cd
), listing files (ls
), creating directories (mkdir
), and editing files with a terminal-based editor like Nano
or Vim
. This is a fundamental skill for any developer.
-
Look into Docker
The next major step in modern development is containerization. Docker
is the industry standard, and it integrates perfectly with WSL. Learning how to build and run applications in Docker containers will dramatically improve your workflow and deployment process.