Skip to content

Commit 9ff5033

Browse files
authored
Merge pull request #345 from jfryton/main
Guide for Windows Subsystem for Linux
2 parents 66256ac + 055edc7 commit 9ff5033

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

docs/WSL.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Windows Subsystem for Linux (Ubuntu) Installation Guide
2+
3+
Here's an easy-to-follow, step-by-step guide for installing Windows Subsystem for Linux (WSL) with Ubuntu on Windows 10/11:
4+
5+
## Step 1: Enable WSL
6+
7+
1. Press the Windows key + X and click on "Windows PowerShell (Admin)" or "Windows Terminal (Admin)" to open PowerShell or Terminal with administrator privileges.
8+
2. In the PowerShell window, type the following command and press Enter:
9+
10+
```
11+
wsl --install
12+
```
13+
14+
If this command doesn't work, you can enable WSL with the following command for Windows 10:
15+
16+
```
17+
wsl --set-default-version 1
18+
```
19+
20+
For Windows 11, you can use:
21+
22+
```
23+
wsl --set-default-version 2
24+
```
25+
26+
You may be prompted to restart your computer. If so, save your work and restart.
27+
28+
## Step 2: Install Ubuntu
29+
30+
1. Open the Microsoft Store.
31+
2. Search for "Ubuntu" in the search bar.
32+
3. Choose the desired Ubuntu version (e.g., Ubuntu 20.04 LTS) and click "Get" or "Install" to download and install the Ubuntu app.
33+
4. Once the installation is complete, click "Launch" or search for "Ubuntu" in the Start menu and open the app.
34+
35+
## Step 3: Set up Ubuntu
36+
37+
1. When you first launch the Ubuntu app, it will take a few minutes to set up. Be patient as it installs the necessary files and sets up your environment.
38+
2. Once the setup is complete, you will be prompted to create a new UNIX username and password. Choose a username and password, and make sure to remember them, as you will need them for future administrative tasks within the Ubuntu environment.
39+
40+
## Step 4: Update and upgrade packages
41+
42+
1. After setting up your username and password, it's a good idea to update and upgrade your Ubuntu system. Run the following commands in the Ubuntu terminal:
43+
44+
```
45+
sudo apt update
46+
sudo apt upgrade
47+
```
48+
49+
2. Enter your password when prompted. This will update the package list and upgrade any outdated packages.
50+
51+
Congratulations! You have now installed WSL with Ubuntu on your Windows 10/11 system. You can use the Ubuntu terminal for various tasks, like running Linux commands, installing packages, or managing files.
52+
53+
You can launch your WSL Ubuntu installation by selecting the Ubuntu app (like any other program installed on your computer) or typing 'ubuntu' into Powershell or Terminal.
54+
55+
## Step 5: Proceed with Linux instructions
56+
57+
1. You can now follow the Linux setup instructions. If you receive any error messages about a missing tool or package, just install them using apt:
58+
59+
```
60+
sudo apt install [missing package]
61+
```
62+
63+
If you face any issues or need to troubleshoot, you can always refer to the official Microsoft documentation for WSL: https://docs.microsoft.com/en-us/windows/wsl/
64+
65+
## Bonus: Port Forwarding
66+
67+
By default, you won't be able to access the webui from another device on your local network. You will need to setup the appropriate port forwarding using the following command (using PowerShell or Terminal with administrator privileges).
68+
69+
```
70+
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=7860 connectaddress=localhost connectport=7860
71+
```
72+
73+

0 commit comments

Comments
 (0)