Getting started with WSL P1: Intro
Despite Windows that dominating the OS market from years, Linux is another popular OS. Many people use these two operating systems at a time on a single machine, currently, there are only 3 ways to do that. One, use Linux as a virtual machine. Second, duel boot. third, WSL. In this article, I am gonna show how you can start using Windows Subsystem Linux and basic things about that.
What is WSL?
WSL stands for Windows Subsystem Linux, as the name explains WSL is a new Windows 10 feature that allows you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and windows store applications without the overhead of a virtual machine. It has several advantages over a virtual machine instance in that it uses very little resources (comparatively) and is highly integrated into the desktop experience.
Who should use WSL?
Officially Microsoft does not support the GUI applications of Linux on WSL, therefore, WSL is useful only for developers who work on common-linux tools, bash, open-source projects, ruby & python to use their toolchain on windows. You can start using WSL if you wanna see how it works.
More than a Shell?
You can execute your favorite shell commands as you would expect but the much larger implication is that you can install and run native Linux ELF64 binaries using your distribution’s software management system, such as apt-get in Ubuntu. Not only can you work with the file system space that is created for WSL, but you can also directly access the Windows file system through mount points in “/mnt”. In fact, if you “echo $PATH”, you will notice that your Windows PATH is appended. The most compelling aspect of WSL is the ability to install native Linux applications directly with the distribution’s software management system. For example, I installed Postgres in WSL.
Setting up WSL
Before doing further steps you must check the following things.
- You must be running Windows 10 version 1607 (the Anniversary update) or above.
- WSL will only run on 64-bit versions of Windows 10. 32-bit versions are not supported.
Open Run window by pressing windows key + r and type appwiz.cpl. This will open control panel with add & remove features window.
Click on turn windows features on or off, enable Windows Subsystem Linux option, Restart your system.
Open Microsoft Store and download available Linux distro in store. I am recommending Ubuntu. (Very few distros available for WSL)
Now type bash in command prompt/Powershell whenever you wanna open WSL.
I will provide more detailed info about WSL and WSL 2 in the next article named part 2.