It's obvious that to learn Linux one should have a Linux-based machine to work with and execute commands. There are four possible ways to get started with Linux.
Possible ways to work with Linux
- Building a Linux-based computer which is quite expensive. I myself don't prefer to build a machine when I am a Student.
- Installing and using Linux in dual boot mode with your existing Windows using a virtual box. This is one of my preferred ways but it consumes more storage. So, this too fails.
- And the next way is to create instances in cloud platforms like AWS, GCP, and Azure and using remotely. Also, there is no cost associated with it. Because major cloud platforms offer free credits ranging from 100 to 300 US dollars. Which is a perfect idea, isn't it? But why use this when we have a more simplest way.
- Here's my preferred way to use Linux by installing WSL on your existing Windows machine.
Let's talk about WSL and Linux distributions (distros)
What is WSL?
WSL is abbreviated as Windows Subsystem for Linux. When you install WSL, it will create a Linux environment in your Windows machine. So that you can install Linux-specific tools and packages. It uses the same virtualization technology used by VMware and Virtual Box. But the environment is super lightweight. Also, you can choose specific Linux distributions from the Microsoft store to install.
There are two versions available, WSL 1 and WSL 2. WSL 2 is a new version of the Windows Subsystem for Linux architecture. The primary goals of WSL 2 are to increase file system performance, as well as to add full system compatibility.
The Linux distribution sitting on top of WSL can be upgraded or downgraded at any time and if you prefer to use both WSL 1 and WSL 2 with different distributions you are permitted to do that.
Alright, let's dive into the installation part.
Installing WSL
You can install everything you need to run WSL by entering this command in Powershell. The Powershell window should be opened as an administrator.
wsl --install
After this, you need to install a distro. To see the available distros, run this command
wsl --list --online
To install a distro, run this command
wsl --install -d <DistroName>
For example, if I like to install a Debian distro, I should run this
wsl --install -d Debian
That's the installation part. After installing WSL and the distribution, you should create a username and password for your Linux distribution.
Here's the detailed guide for that: Set up a WSL development environment
The installation part we have seen will only work if you are running Windows 10 Version 2004 and higher. For older versions of windows, you should do some extra steps to install WSL.
Here's the detailed guide for that: Manual installation steps for older versions of WSL
WSL is the easiest and recommended way to work with linux on windows. Thanks for reading!

Comments
Post a Comment