Windows WSL Instruction - robotic-vision-lab/UR-Robotiq-Integrated-Driver GitHub Wiki
These instructions are tested on a fresh installation of Windows 11 Version 10.0.22000 Build 22000.
- Overview
- Step 1: Install WSL2
- Step 2: Install Ubuntu 22.04.1 LTS
- Step 2.5: Preliminary Checks
- Step 3: Install Docker
Ignore which distribution will be installed, for now.
Open an elevated (Run as Administrator) terminal, we will need elevated privileges for the rest of step 1.
user@host:~$ wsl --install
Installing: Virtual Machine Platform
Virtual Machine Platform has been installed.
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
Downloading: WSL Kernel
Installing: WSL Kernel
WSL Kernel has been installed.
Downloading: GUI App Support
Installing: GUI App Support
GUI App Support has been installed.
Downloading: Ubuntu
The requested operation is successful. Changes will not be effective until the system is rebooted.
Reboot the system now.
After reboot, you should see a WSL setup window pops up and eventually ask you for a WSL username and password.
If you are planning to use Ubuntu 20.04.4 LTS, finish the user setup, and follow the instructions below but skip the --unregister step.
Otherwise, close the user setup window. We will update the kernel, set default WSL version, and unregister Ubuntu 20.04.4 LTS.
user@host:~$ wsl --shutdown
user@host:~$ wsl --unregister Ubuntu
Unregistering...
user@host:~$ wsl --update
Checking for updates...
Downloading updates...
Installing updates...
This change will take effect on the next full restart of WSL. To force a restart, please run 'wsl --shutdown'.
Kernel version: 5.10.102.1
user@host:~$ wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.
Note that the kernel version here is 5.10.102.1. This is important for later steps.
⚠️ At the time of writing, Ubuntu 22.04 LTS is not available through command line. You can install it via Microsoft Store instead.Link to Store page: https://apps.microsoft.com/store/detail/ubuntu-22041-lts/9PN20MSR04DW?hl=en-us&gl=US
Skip this if you are using Ubuntu 20.04 LTS. Once reached the bash prompt, the rest of the instruction is identical for both distribution.
I used Ubuntu 22.04.1 LTS. Just follow instruction after you downloaded it from the Microsoft Store. After installation, you should see a terminal with something like this.
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.10.102.1-microsoft-standard-WSL2 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
/etc/update-motd.d/50-landscape-sysinfo: 17: cannot create /var/lib/landscape/landscape-sysinfo.cache: Permission denied
13 updates can be applied immediately.
1 of these updates is a standard security update.
To see these additional updates run: apt list --upgradable
This message is shown once a day. To disable it please create the
/home/your_username/.hushlogin file.
wsl-user@host:~$
Verify your WSL and kernel version, and check if you can spawn GUI applications. I used glxgears
from mesa-utils
. If you have a NVIDIA graphics card and want to utilize it, there are additional
setup steps you would need to follow (will be linked later).
On your Windows terminal (not WSL), run
user@host:~$ wsl -l -v
NAME STATE VERSION
* Ubuntu-22.04 Running 2
You should see WSL VERSION 2 as shown.
In your WSL terminal, run
wsl-user@host:~$ uname -a
Linux your_hostname 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
The kernel version here should match with the previously showed in the update step.
user@host:~$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
[...]
user@host:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
[...]
user@host:~$ sudo apt install mesa-utils
[...]
user@host:~$ glxinfo | grep "OpenGL"
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA Quadro P4000)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.5
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
user@host:~$ glxgears
882 frames in 5.0 seconds = 176.259 FPS
890 frames in 5.0 seconds = 177.988 FPS
900 frames in 5.0 seconds = 179.949 FPS
[...]
At this point, you should see a small window displaying colored gears spinning. It may take a couple of seconds to show up.
Two important things happened here:
- We are able to spawn a GUI windows (the gears).
- WSL2 is using D3D12 to render, utilizing our NVIDIA GPU, therefore it has access to it.
OpenGL renderer string: D3D12 (NVIDIA Quadro P4000)
Continue to Docker Installation.