|
| 1 | +# WSL2 development environment |
| 2 | + |
| 3 | +This is a collection of Ansible scripts helping with the creation and maintenance of your WSL2 development environment. |
| 4 | + |
| 5 | +If you're not already using it, we recommend you to install [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701?hl=en-US&gl=US). |
| 6 | +It is a modern tool that incorporates the power of multiple already known command-line applications like `Windows PowerShell`, `Linux shell`, and more... |
| 7 | + |
| 8 | +## Check if WLS2 is already available |
| 9 | + |
| 10 | +Open `Windows Terminal` and execute the following command: |
| 11 | + |
| 12 | +```shell |
| 13 | +wsl -v |
| 14 | +``` |
| 15 | + |
| 16 | +The output should look similar to this: |
| 17 | + |
| 18 | +```text |
| 19 | +WSL version: 2.2.4.0 |
| 20 | +Kernel version: 5.15.153.1-2 |
| 21 | +WSLg version: 1.0.61 |
| 22 | +MSRDC version: 1.2.5326 |
| 23 | +Direct3D version: 1.611.1-81528511 |
| 24 | +DXCore version: 10.0.26091.1-240325-1447.ge-release |
| 25 | +Windows version: 10.0.22631.3737 |
| 26 | +``` |
| 27 | + |
| 28 | +If the output starts with `WSL version: 2.x.x.x`, you are ready to use **WSL2** and can proceed to [install AlmaLinux 10](wsl/README.md). |
| 29 | + |
| 30 | +## Install WSL2 |
| 31 | + |
| 32 | +Before proceeding with the installation, please consult Microsoft's [documentation](https://learn.microsoft.com/en-us/windows/wsl/install#prerequisites) regarding the minimum requirements for running WSL2. |
| 33 | + |
| 34 | +Once you identified that your machine can run WSL2, open the `Run` prompt by pressing `Win` + `r`, type `OptionalFeatures` in the dialog and press `Enter`. |
| 35 | +This will open a window where you can turn Windows features on/off. |
| 36 | +Make sure that the below features are activated (checked): |
| 37 | + |
| 38 | +* `Hyper-V` (including its sub-features) |
| 39 | +* `Virtual Machine Platform` |
| 40 | +* `Windows Subsystem for Linux` |
| 41 | + |
| 42 | +> If any of the above features are missing, then first you need to install them manually using [this guide](https://docs.microsoft.com/en-us/windows/wsl/install-manual) and then continue with the below steps. |
| 43 | +
|
| 44 | +Click `Ok` and restart your computer. |
| 45 | + |
| 46 | +Open Microsoft Store, search for `Windows Subsystem for Linux` and install it. |
| 47 | + |
| 48 | +Make sure that version **2** of WSL is set as default by executing the below command in Windows Terminal: |
| 49 | + |
| 50 | +```shell |
| 51 | +wsl --set-default-version 2 |
| 52 | +``` |
| 53 | + |
| 54 | +To test, run again the following command: |
| 55 | + |
| 56 | +```shell |
| 57 | +wsl -v |
| 58 | +``` |
| 59 | + |
| 60 | +This time the output should display `WSL version: 2.x.x.x`, which means that your system is ready for using **WSL2** and you can proceed to [install AlmaLinux 10](wsl/README.md). |
0 commit comments