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: WSL/compare-versions.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,9 @@ ms.localizationpriority: high
9
9
10
10
# Comparing WSL 2 and WSL 1
11
11
12
-
The primary goals of updating the Windows Subsystem for Linux to a new version are to **increase file system performance** and support **full system call compatibility**. WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience - learn more about the [WSL 2 architecture](#wsl-2-architecture) below.
12
+
The primary goals of updating the Windows Subsystem for Linux to a new version are to **increase file system performance** and support **full system call compatibility**.
13
+
14
+
WSL 2 uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 is not a traditional VM experience. [Learn more about the WSL 2 architecture](#wsl-2-architecture).
13
15
14
16
## Comparing features
15
17
@@ -31,8 +33,9 @@ Already using WSL 1 and want to upgrade to WSL 2? Follow the instructions to [up
31
33
In order to optimize for the fastest performance speed, be sure to store your project files in the Linux file system (not the Windows file system).
32
34
33
35
For example, when storing your WSL project files:
34
-
- Use the Linux file system root directory: `\\wsl$\Ubuntu-18.04\home\<user name>\Project`
35
-
- Not the Windows file system root directory: `C:\Users\<user name>\Project`
36
+
37
+
* Use the Linux file system root directory: `\\wsl$\Ubuntu-18.04\home\<user name>\Project`
38
+
* Not the Windows file system root directory: `C:\Users\<user name>\Project`
36
39
37
40
Project files that you are working with using a WSL distribution (like Ubuntu) must be in the Linux root file system to take advantage of faster file system access.
38
41
@@ -72,8 +75,9 @@ The actual speed increase will depend on which app you're running and how it is
72
75
73
76
Linux binaries use system calls to perform functions such as accessing files, requesting memory, creating processes, and more. Whereas WSL 1 used a translation layer that was built by the WSL team, WSL 2 includes its own Linux kernel with full system call compatibility. Benefits include:
74
77
75
-
- A whole new set of apps that you can run inside of WSL, such as **[Docker](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2)** and more.
76
-
- Any updates to the Linux kernel are immediately ready for use. (You don't have to wait for the WSL team to implement updates and add the changes).
78
+
* A whole new set of apps that you can run inside of WSL, such as **[Docker](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2)** and more.
79
+
80
+
* Any updates to the Linux kernel are immediately ready for use. (You don't have to wait for the WSL team to implement updates and add the changes).
77
81
78
82
### WSL 2 uses a smaller amount of memory on startup
79
83
@@ -89,10 +93,10 @@ However, if you are running an older version of Windows (Build 18945 or less), y
89
93
90
94
To find the IP address of the virtual machine powering your Linux distribution:
91
95
92
-
- From your WSL distribution (ie Ubuntu), run the command: `ip addr`
93
-
- Find and copy the address under the `inet` value of the `eth0` interface.
94
-
- If you have the grep tool installed, find this more easily by filtering the output with the command: `ip addr | grep eth0`
95
-
- Connect to your Linux server using this IP address.
96
+
*From your WSL distribution (ie Ubuntu), run the command: `ip addr`
97
+
* Find and copy the address under the `inet` value of the `eth0` interface.
98
+
* If you have the grep tool installed, find this more easily by filtering the output with the command: `ip addr | grep eth0`
99
+
* Connect to your Linux server using this IP address.
96
100
97
101
The picture below shows an example of this by connecting to a Node.js server using the Edge browser.
98
102
@@ -127,7 +131,7 @@ This isn't the default case in WSL 2. WSL 2 has a virtualized ethernet adapter w
127
131
128
132
WSL 2 distributions currently cannot reach IPv6-only addresses. We are working on adding this feature.
129
133
130
-
## WSL 2 Virtual Hardware Disk limitations
134
+
## Expanding the size of your WSL 2 Virtual Hardware Disk
131
135
132
136
WSL 2 uses a Virtual Hardware Disk (VHD) to store your Linux files. If you reach its max size you may need to expand it.
0 commit comments