WSL Subsystem Installation
Last updated
Last updated
1.1 Check if CPU Virtualization is enabled
Open Task Manager, click [Performance], and in the pop-up window, check if virtualization is enabled.
1.2 Enable Virtual Machine and Windows Subsystem
As shown in the image above, Open the Control Panel, go to Programs and Features, click "Turn Windows Features on or off," and check the relevant features in the pop-up window. Restart the computer to apply the changes.
2.1 WSL installation and version update
In Windows Powershell (run as administrator), enter wsl --update
to start installing wsl or a newer version.
2.2 WSL Install Ubuntu Subsystem
In Windows Powershell (run by the administrator), enter the following command to install:
Enter your username and password to create an Ubuntu user account.
As shown in the above figure, the Ubuntu 22.04 subsystem has been successfully installed.
2.3 Install Docker In The Ubuntu subsystem.
Enter docker info to check if the subsystem already has a docker service.
If it is already present, installation is not needed. Otherwise, use the following command in Ubuntu to install:
2.4 Install Graphics Driver For Ubuntu Subsystem
View graphics card information
If the results match the image above, no further action is required.
NVIDIA Container Runtime Installation and Usage
With NVIDIA Container Runtime, registers a new runtime during container creation to expose the NVIDIA GPU to applications in the container.
# Add Library
# Install nvidia-container-runtime
#Verify if the installation was successful.
At this point, the WSL installation and Ubuntu subsystem setup are complete.
Note:The above command should match your Ubuntu version; for details, refer to: