2022-02-23 13:28:15 +00:00
|
|
|
---
|
2022-05-24 12:08:01 +01:00
|
|
|
title: Setup WSL 🪟 ❤️ 🐧
|
2024-11-29 02:26:53 +00:00
|
|
|
description: ""
|
|
|
|
|
tags:
|
|
|
|
|
- linux
|
|
|
|
|
- windows
|
|
|
|
|
- wsl
|
|
|
|
|
author: ahmza
|
|
|
|
|
date: 2022-02-23
|
2022-02-23 19:19:56 +00:00
|
|
|
draft: false
|
2024-01-05 23:54:51 +00:00
|
|
|
weight:
|
2024-11-29 02:26:53 +00:00
|
|
|
featureimage: feature.webp
|
|
|
|
|
lastmod:
|
2022-02-23 13:28:15 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## **Introduction**
|
2024-01-05 23:54:51 +00:00
|
|
|
|
|
|
|
|
WSL stands for _Windows Subsystem for Linux_ which means we have the Linux
|
|
|
|
|
kernel inside of windows. This is huge news for developers or people who just
|
|
|
|
|
want to try Linux.
|
2022-02-23 13:28:15 +00:00
|
|
|
|
|
|
|
|
## **Prerequisites**
|
2024-01-05 23:54:51 +00:00
|
|
|
|
|
|
|
|
- Enable virtualisation in BIOS
|
2022-02-23 13:28:15 +00:00
|
|
|
|
|
|
|
|
## **Setup**
|
2024-01-05 23:54:51 +00:00
|
|
|
|
2022-02-23 18:14:49 +00:00
|
|
|
Open Powershell in Administrator mode
|
2024-01-05 23:54:51 +00:00
|
|
|
|
|
|
|
|
```powershell
|
2022-02-23 13:28:15 +00:00
|
|
|
wsl --install
|
|
|
|
|
```
|
2024-01-05 23:54:51 +00:00
|
|
|
|
|
|
|
|
> You may have to restart the device, I Highly recommend you do
|
2022-02-23 13:28:15 +00:00
|
|
|
|
|
|
|
|
Go to the Microsoft store and search for a Linux distribution. I prefer
|
2024-01-05 23:54:51 +00:00
|
|
|
to use the "Ubuntu" distribution.
|
2022-02-23 13:28:15 +00:00
|
|
|
|
2022-02-23 19:33:52 +00:00
|
|
|

|
2022-02-23 13:28:15 +00:00
|
|
|
|
2024-01-05 23:54:51 +00:00
|
|
|
Once installed, go ahead and run the distribution, after it finishes setting
|
|
|
|
|
itself up it will ask you for a username and password. These credentials are
|
|
|
|
|
separate from the host system so you can make them whatever you want.
|
2022-02-23 13:28:15 +00:00
|
|
|
|
|
|
|
|
And that's it you have WSL and a Linux distribution setup, now go and do
|
|
|
|
|
something awesome.
|
|
|
|
|
|
|
|
|
|
## **Optional**
|
2024-01-05 23:54:51 +00:00
|
|
|
|
2022-02-23 13:28:15 +00:00
|
|
|
I use the windows terminal app to run the Ubuntu distribution, it makes
|
|
|
|
|
customising the environment a lot easier. To download it head over to the
|
|
|
|
|
Microsoft store and search for Windows Terminal and download it.
|
|
|
|
|
|
2022-02-23 19:33:52 +00:00
|
|
|

|
2022-02-23 13:28:15 +00:00
|
|
|
|
2024-01-05 23:54:51 +00:00
|
|
|
When you login to WSL it will not default to your home directory. To fix that go
|
|
|
|
|
to the Windows Terminal Settings look for Ubuntu or your distributions name and
|
|
|
|
|
change the Starting directory to
|
|
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
\\wsl$\<distro>\home\<username>
|
2022-02-23 13:28:15 +00:00
|
|
|
```
|
|
|
|
|
|
2024-01-05 23:54:51 +00:00
|
|
|
> Be sure to change "<distro>" to your distributions name
|
|
|
|
|
|
|
|
|
|
> Be sure to change "<username>" to your username
|
2022-02-23 13:28:15 +00:00
|
|
|
|
2022-02-23 19:33:52 +00:00
|
|
|

|
2022-02-23 13:28:15 +00:00
|
|
|
|
|
|
|
|
## **Conclusion**
|
2024-01-05 23:54:51 +00:00
|
|
|
|
2022-02-23 13:28:15 +00:00
|
|
|
Well done you have managed to setup WSL and use Linux inside of windows.
|
|
|
|
|
No go and enjoy the freedom of Linux !!
|