Updated content in old posts.

This commit is contained in:
Hamza Ahmed
2024-01-05 23:54:51 +00:00
parent c916352195
commit cf68a1d2cc
10 changed files with 745 additions and 639 deletions
+32 -25
View File
@@ -3,69 +3,76 @@ title: Setup WSL 🪟 ❤️ 🐧
date: 2022-02-23T11:57:08Z
author: "ahmza"
draft: false
weight:
weight:
tags: ["windows", "linux", "wsl"]
description: ""
canonicalURL: "https://blog.ahmza.com/Page%28/posts/setup-wsl.md%29"
cover:
image: "webp/posts/wsl/feature-anim.webp" # image path/url
alt: "Windows Loves Linux" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
image: "webp/posts/wsl/feature-anim.webp" # image path/url
alt: "Windows Loves Linux" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
showtoc: true
searchHidden: false
---
## **Introduction**
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.
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.
## **Prerequisites**
* Enable virtualisation in BIOS
- Enable virtualisation in BIOS
## **Setup**
Open Powershell in Administrator mode
``` powershell
```powershell
wsl --install
```
> You may be required to restart the device, I Highly recommend you do
> You may have to restart the device, I Highly recommend you do
Go to the Microsoft store and search for a Linux distribution. I prefer
to use the "Ubuntu" distro.
to use the "Ubuntu" distribution.
![Microsoft Store](/img/WSL/ubuntu.webp)
Once that is 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.
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.
And that's it you have WSL and a Linux distribution setup, now go and do
something awesome.
## **Optional**
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.
![Microsoft Store](/img/WSL/winterm.webp)
When you login to WSL it will not default to your home directory which gets
very annoying. So to fix that go to Windows Terminal Settings (Be sure to
look around there are some cool features) look for Ubuntu or your
distributions name and change the Starting directory to
``` powershell
\\wsl$\Ubuntu\home\ahmza
```
> Be sure to change "Ubuntu" to your distributions name
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
> Be sure to change "ahmza" to your username
```powershell
\\wsl$\<distro>\home\<username>
```
> Be sure to change "<distro>" to your distributions name
> Be sure to change "<username>" to your username
![winterm-settings](/img/WSL/winterm-settings.webp)
## **Conclusion**
Well done you have managed to setup WSL and use Linux inside of windows.
No go and enjoy the freedom of Linux !!