Do you want to use linux alongside windows? Then WSL is for you. WSL (The Windows Subsystem for Linux) To set up a GNU/Linux environment quickly and simply without leaving Windows, without resorting to virtual machine solutions that will put extra load on the system. This is an ideal solution for those who want to develop on WSL.
How does WSL work?
WSL is a layer that translates Linux system calls to Windows system calls. Thus, there is not much difference between software running on WSL and software running on Windows. In addition, only the “userland” part of Linux, which is the user layer, can be translated by the layer. So it is not possible to run Linux drivers under Windows yet.
Background processes that we call “daemon” can also work in WSL because they work in the “userland” part. If you are dealing with web servers, WSL offers a solution for you as well.
Software such as Cygwin already offered such a solution to users, but WSL is more popular than Cygwin because it is more integrated with Windows.
First, let’s enable WSL
The activation process of WSL is different in Windows 10 and 11. In Windows 11, you can download WSL from the Microsoft Store. In Windows 10, to activate WSL, let’s enter the dialog where we manage the extra features of Windows by typing “Turn Windows features on or off” in the search bar.
Then, in the dialog that comes up, let’s find the “Windows Subsystem for Linux” option and tick it.
After clicking the “OK” button, our operating system will contact the Microsoft server and start the installation of WSL. Wait until the download is finished. After the installation is complete, a message will appear saying that the desired changes are finished and our device needs to be restarted. Restart Windows.
How can I run WSL?
We will run WSL via PowerShell or Command Prompt, but it will not work naturally since we do not currently install any Linux distributions. We have only activated a feature in windows at the moment.
There are not many Linux distributions that can work with WSL. But you can use linux distributions that most people know and use. These linux distributions are:
- Debian GNU/Linux,
- Ubuntu,
- Kali Linux,
- OpenSuse Leap 42 ve
- SUSE Linux Enterprise Server 12
I preferred to use ubuntu in this model. You can use another linux distribution if you want.
After Ubuntu downloads, we press the “Open” button and it extracts the files and starts the installation.It then asks us to enter a UNIX username. UNIX usernames are usernames that are all lowercase and contain ASCII characters. It should also be noted that it does not have to match our Windows username.
Since the GNU/Linux operating system is designed to replace UNIX systems in institutions, login with a password is mandatory. Although it is very simple, you need to set a password. And we successfully installed it!