xxxxxxxxxx
# Step 1: Open PowerShell as Administrator
# Press Windows key, type "PowerShell", right-click on "Windows PowerShell" and select "Run as administrator"
# Step 2: Enable WSL feature
# Execute the following command in the PowerShell window and restart your computer when prompted
wsl --install
# Step 3: Install a Linux distribution
# After your computer is restarted, open the Microsoft Store and search for your preferred Linux distribution (e.g., Ubuntu, Debian, Fedora). Select one and click on the "Install" button.
# Step 4: Launch and set up the Linux distribution
# Open the installed Linux distribution from the Start menu. The first launch will take a few moments to set up the environment. You will then be prompted to create a new user and set a password for your Linux environment.
# That's it! You have successfully installed WSL on Windows 11 and a Linux distribution of your choice.
xxxxxxxxxx
# WSL Installation
1. Use simultaneously win + X keys and then click on "admin powershell".
```powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
```
This command activate WSL functionalities.
```powershell
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
```
This one allows virtual machines developed by Microsoft.
2. Restart your computer.
3. Download [this file](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) and follow instructions.
4. Now open powershell admin like before and type:
```powershell
wsl --set-default-version 2
```
5. Download [Ubuntu](https://www.microsoft.com/store/apps/9n6svws3rx71) from Microsoft store.
WSL with Ubuntu is now installed.
xxxxxxxxxx
# Install Ubuntu WSL without Windows Store
https://stackoverflow.com/a/64872285
xxxxxxxxxx
Adding a windows installed application to WSL path so we can run from Ubuntu wsl:
Install app on Windows.
Find the applications path to the folder where the executable file (app.exe) is located
copy the path.
on WSL, go to the root folder where .bashrc is located
nano .bashrc
scroll to the end of file and add the path & alias using the format below
export PATH="$PATH:/mnt/c/Program Files/Amazon/AWSCLIV2"
alias aws='aws.exe'
save
apply changes by run source command below
source ~/.bashrc
Now, you should be able to run the application from anywhere in the WSL terminal
xxxxxxxxxx
Step 1: Enable Windows Subsystem for Linux
Open PowerShell as Administrator and run the following command:
wsl --set-default-version 2
Step 2: Install Ubuntu from Microsoft Store
Open Microsoft Store and search for "Ubuntu". Select "Ubuntu" from the search results, click on "Install", and wait for the installation to complete.
Step 3: Launch Ubuntu and Set Up
Open the Start menu, scroll down to the "Ubuntu" folder, and click on "Ubuntu". The first time you launch Ubuntu, it will initialize and ask you to create a new username and password.
That's it! You have successfully installed Ubuntu on WSL.