You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: getting-started/start_with_WSL.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ WSL is the Windows Subsystem for Linux. It sets aside some space on your compute
8
8
9
9
## Install VS Code on your Windows machine
10
10
11
-
It might seem strange to install VS Code before we install WSL, but by doing things this way round we'll save ourselves several fiddly steps later!
11
+
It might seem strange to install VS Code before we install WSL, but by doing things this way round, we'll save ourselves several fiddly steps later!
12
12
13
-
You will need a text editor to be able to make changes to the content you're working with, and the best editor is VS Code. It can be installed on your windows machine, and then WSL can use it – even from inside your Ubuntu virtual machine.
13
+
You will need a text editor to be able to make changes to the content you're working with, and the best editor is VS Code. It can be installed on your Windows machine, and then WSL can use it – even from inside your Ubuntu virtual machine.
14
14
15
15
Go to the [Visual Studio code website](https://code.visualstudio.com/) and scroll down until you see the download button for Windows.
16
16
@@ -34,11 +34,13 @@ When asked if you want to allow WSL to make changes to your device, click "yes".
34
34
35
35
After WSL has finished installing, you'll need to restart your computer (your physical machine, not just the Terminal window) before you can continue.
36
36
37
+
**NOTE**: If you have issues with installing WSL on your Windows machine, you can refer to our [troubleshooting section](./troubleshooting.md) or [Microsoft's official WSL documentation](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting)
38
+
37
39
## Your new Ubuntu VM
38
40
39
41
After you've restarted your physical machine, WSL will automatically launch Ubuntu in a new Terminal window. You won't need the Windows Terminal anymore, so you can close that one, and leave only the Ubuntu window open.
40
42
41
-
The Ubuntu window will be asking you to set up a username and password. This is separate to the credentials you use to log into your Windows machine, although you can choose the same. The password you type will be completely "hidden", so you won't be able to see it or see how many characters you've typed. It will ask you to confirm the password anyway, so if you think you made a mistake, you'll still have to type it correctly twice.
43
+
The Ubuntu window will ask you to set up a username and password. This is separate from the credentials you use to log into your Windows machine, although you can choose the same. The password you type will be completely "hidden", so you won't be able to see it or see how many characters you've typed. It will ask you to confirm the password anyway, so if you think you made a mistake, you'll still have to type it correctly twice.
42
44
43
45
After this is done, your Ubuntu VM will be ready to use!
44
46
@@ -50,8 +52,8 @@ It's always a good idea when you start up a new virtual machine to update and up
50
52
sudo apt update && sudo apt upgrade
51
53
```
52
54
53
-
Using `sudo` will prompt you for a password. This is the same password as you entered when you set up your Ubuntu machine in the previous step.
55
+
Using `sudo` will prompt you for a password. This is the same password you entered when you set up your Ubuntu machine in the previous step.
54
56
55
57
When asked if you want to continue, type `y` (not case sensitive).
56
58
57
-
You're now ready to move onto the next stage! [Install and configure git](install_git.md).
59
+
You're now ready to move on to the next stage! [Install and configure git](install_git.md).
This document aims to help you fix issues you may encounter when getting started.
4
+
5
+
## Troubleshoot a failed WSL installation
6
+
7
+
This section provides a possible way to troubleshoot a failed installation of Windows Subsystem for Linux (WSL). You can also refer to [Microsoft's official WSL documentation](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting) for more information on troubleshooting WSL.
8
+
9
+
If the `wsl --install` command returns the message "This operation timed out", you can debug the issue by following these steps:
10
+
11
+
1. Using your search bar, search for "Turn Windows features on or off" and select it. It'll open a window with some options for you. In this window, you should select the following options:
12
+
* Virtual Machine Platform
13
+
* Windows Subsystem for Linux
14
+
15
+

16
+
17
+
2. After you select these options, open your system's task manager and navigate to the performance tab. You should look for an option that says "virtualisation" to make sure it's enabled. If it isn't enabled, follow this [Microsoft guide](https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-11-pcs-c5578302-6e43-4b4b-a449-8ced115f58e1) to enable it for your system.
18
+

19
+
20
+
3. Restart your machine and try the `wsl --install` command again. It should work now.
21
+
22
+
4. If you retry the command and it doesn't work as expected, you might see an error that says, "Windows Subsystem for Linux is already installed. The operation timed out". In this case, you should update your WSL version with this command:
23
+
```shell
24
+
wsl.exe --update
25
+
```
26
+
Then set the default WSL version to version 2:
27
+
```shell
28
+
wsl --set-default-version 2
29
+
```
30
+
5. Once you have completed the above steps, open your Microsoft Store and search for"Ubuntu". It's advisable to install the latest version. After the installation, you should launch the app. It'll automatically connect to your WSL and you should be able to follow the [next steps](./start_with_WSL.md) without errors.
0 commit comments