Windows Subsystem Linux (WSL): A Boon for Developers
|Never thought I'd see the day.|
I'm a software developer. I code for a living. Also, I used to use Windows for my everyday tasks, and negligent to switch to Linux, despite what everyone says.
However, almost a year ago, I was issued a MacBook by my company, and a coding boot camp. From there, I learned that you can do your development faster from UNIX and its derivatives (Linux, macOS) compared to Windows. There are so many tools built into the Terminal and installing most development tools and libraries (such as Brew, ZSH) are also easier and faster. These tools aren't available to Windows users, even though they are so efficient and time-saving. Even if there is, installing it may take more effort.
On the other hand, I cannot fully commit to Linux. I sometimes game and fully switching to Mac is expensive. So, what's the solution for me?
Enter Windows Subsystem Linux, or WSL, for short, something that Microsoft officially supports in October 2018. It basically offers the capability of running UNIX shell inside Windows. I've given it a try and so far, it's promising.
Enable Feature in PowerShellInstalling WSL is pretty easy. All you need to do is to make sure you've installed Windows 10 October update, then go enable WSL in PowerShell using the following command. Oh, and make sure you execute it with admin rights.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
|Enabling the feature in PowerShell.|
Installing Linux DistributionWhen you're done restarting, go ahead and search for Linux in Microsoft Store. You'll be greeted with a banner like the image below. Click Get the apps button to view available Linux distributions.
|Microsoft even prepared this banner for WSL.|
|Installing Ubuntu from Microsoft Store.|
Initializing DistributionOnce your distro is done installing, you can either access it via the Start menu (your distribution name) or from the Command Prompt by launching wsl.exe.
|Once installed, WSL is available in your Start menu.|
|An account is needed to run commands which require root access.|
|On WSL, you can use your favorite UNIX commands.|
- It doesn't have GUI (obviously...)
- The directory location is a bit different. Instead of using drive letter directly, you'll have to go to /mnt/driveLetter to access your Windows drive.
- There may be incompatibilities between Windows and Linux version of the same software. For example, Linux Git has a strange issue of considering (almost) all files being changed, while in Windows version nothing was changed. Your mileage may vary.
- The WSL comes with bare package. Depending on your view, this may either be good or bad thing.
|I never thought this would be possible on Windows.|
If you're a software developer and uses Linux or Mac for your everyday job, and have a Windows computer lying around, I'd recommend you to give it a try. Who knows, you might like it.
Well, I guess that's all for now, Folks. I hope this article is useful for you, and sorry for the long update, since I'm gearing up for holiday XD. Finally, as usual, thanks for visiting and see you in the next article. Happy long holidays, everyone! :D