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
+31-5Lines changed: 31 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,37 @@ 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
+
38
+
## Troubleshooting WSL Failed Installation
39
+
40
+
If the `wsl --install` command does not work for you, especially if it returns the message "This operation timed out", you can debug the issue by following these steps:
41
+
42
+
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:
43
+
* Virtual Machine Platform
44
+
* Windows Subsystem for Linux
45
+
46
+

47
+
48
+
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 [tutorial to enable it for your system](https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-11-pcs-c5578302-6e43-4b4b-a449-8ced115f58e1).
49
+

50
+
51
+
3. The next step is to restart your machine and try the `wsl --install` command again. It should work now.
52
+
53
+
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". You should update your WSL version with this command:
54
+
```shell
55
+
wsl.exe --update
56
+
```
57
+
The next step is to set the default WSL version to version 2. Use this command:
58
+
```shell
59
+
wsl --set-default-version 2
60
+
```
61
+
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 without errors.
62
+
37
63
## Your new Ubuntu VM
38
64
39
65
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
66
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.
67
+
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
68
43
69
After this is done, your Ubuntu VM will be ready to use!
44
70
@@ -50,8 +76,8 @@ It's always a good idea when you start up a new virtual machine to update and up
50
76
sudo apt update && sudo apt upgrade
51
77
```
52
78
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.
79
+
Using `sudo` will prompt you fora password. This is the same password you entered when you set up your Ubuntu machinein the previous step.
54
80
55
81
When asked if you want to continue, type`y` (not case sensitive).
56
82
57
-
You're now ready to move onto the next stage! [Install and configure git](install_git.md).
83
+
You're now ready to move on to the next stage! [Install and configure git](install_git.md).
0 commit comments