{"id":11075,"date":"2025-12-28T12:00:23","date_gmt":"2025-12-28T17:00:23","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=11075"},"modified":"2025-12-28T12:43:47","modified_gmt":"2025-12-28T17:43:47","slug":"wsl2-install-in-win11-powershell","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/wsl2-install-in-win11-powershell\/","title":{"rendered":"WSL2 Install in Win11 Powershell"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_11075\" class=\"pvc_stats all  \" data-element-id=\"11075\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>PS C:\\Users\\steve&gt; <span style=\"color: #0000ff;\">wsl.exe --list --online<\/span><br \/>\nThe following is a list of valid distributions that can be installed.<br \/>\nInstall using 'wsl.exe --install &lt;Distro&gt;'.<\/p>\n<p>NAME FRIENDLY NAME<br \/>\nUbuntu Ubuntu<br \/>\nUbuntu-24.04 Ubuntu 24.04 LTS<br \/>\nopenSUSE-Tumbleweed openSUSE Tumbleweed<br \/>\nopenSUSE-Leap-16.0 openSUSE Leap 16.0<br \/>\nSUSE-Linux-Enterprise-15-SP7 SUSE Linux Enterprise 15 SP7<br \/>\nSUSE-Linux-Enterprise-16.0 SUSE Linux Enterprise 16.0<br \/>\nkali-linux Kali Linux Rolling<br \/>\nDebian Debian GNU\/Linux<br \/>\nAlmaLinux-8 AlmaLinux OS 8<br \/>\nAlmaLinux-9 AlmaLinux OS 9<br \/>\nAlmaLinux-Kitten-10 AlmaLinux OS Kitten 10<br \/>\nAlmaLinux-10 AlmaLinux OS 10<br \/>\narchlinux Arch Linux<br \/>\nFedoraLinux-43 Fedora Linux 43<br \/>\nFedoraLinux-42 Fedora Linux 42<br \/>\nUbuntu-20.04 Ubuntu 20.04 LTS<br \/>\nUbuntu-22.04 Ubuntu 22.04 LTS<br \/>\nOracleLinux_7_9 Oracle Linux 7.9<br \/>\nOracleLinux_8_10 Oracle Linux 8.10<br \/>\nOracleLinux_9_5 Oracle Linux 9.5<br \/>\nopenSUSE-Leap-15.6 openSUSE Leap 15.6<br \/>\nSUSE-Linux-Enterprise-15-SP6 SUSE Linux Enterprise 15 SP6<br \/>\nPS C:\\Users\\steve&gt; <span style=\"color: #0000ff;\">wsl.exe --install Ubuntu<\/span><br \/>\nThe requested operation requires elevation.<\/p>\n<p>Deployment Image Servicing and Management tool<br \/>\nVersion: 10.0.26100.1150<\/p>\n<p>Image Version: 10.0.26100.4061<\/p>\n<p>Enabling feature(s)<br \/>\n[==========================100.0%==========================]<br \/>\nThe operation completed successfully.<br \/>\nThe requested operation is successful. Changes will not be effective until the system is rebooted.<\/p>\n<p>Once installed, I set up mirroring for the net adaptors of Win11 and WSL2 to be shared, so there is no NAT required for a different WSL2 subnet than Win11 would be on. There is still a technical boundary between them where WSL2 could use it's UFW firewall as an extra layer between WSL2 and Windows Defender that protects the external boundary (that connects to the Internet via a WiFi router etc). You know mirroring is working if both WSL2 and Win11 have the same adaptors info:<\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2025\/12\/Mirroring.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11078\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2025\/12\/Mirroring.png\" alt=\"\" width=\"1366\" height=\"768\" \/><\/a><\/p>\n<p>You can decide on resources you want for WSL2 using the .wslconfig file in your Win User folder:<\/p>\n<p>[wsl2]<br \/>\nmemory=4GB<br \/>\nprocessors=2<br \/>\nnetworkingMode=mirrored<br \/>\ndnsTunneling=true<br \/>\nfirewall=true<br \/>\nautoProxy=true<\/p>\n<hr \/>\n<p>You should ne able to ping across the Win11 boundary to the Internet with DNS resolution:<\/p>\n<p>steve@baby:~$ <span style=\"color: #0000ff;\">ping 8.8.8.8<\/span><br \/>\nPING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.<br \/>\n64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=29.5 ms<br \/>\n64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=12.8 ms<br \/>\n64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=14.5 ms<br \/>\n^C<br \/>\n--- 8.8.8.8 ping statistics ---<br \/>\n3 packets transmitted, 3 received, 0% packet loss, time 2077ms<br \/>\nrtt min\/avg\/max\/mdev = 12.776\/18.928\/29.540\/7.535 ms<br \/>\nsteve@baby:~$ <span style=\"color: #0000ff;\">ping google.com<\/span><br \/>\nPING google.com (172.217.162.142) 56(84) bytes of data.<br \/>\n64 bytes from gru14s19-in-f14.1e100.net (172.217.162.142): icmp_seq=1 ttl=118 time=12.9 ms<br \/>\n64 bytes from gru14s19-in-f14.1e100.net (172.217.162.142): icmp_seq=2 ttl=118 time=14.7 ms<\/p>\n<p>Now you can do updates, install linux Apps etc. eg :<\/p>\n<p><span style=\"color: #0000ff;\"> sudo apt install vim speedtest-cli<\/span><\/p>\n<p>steve@baby:~$ <span style=\"color: #0000ff;\">speedtest<\/span><br \/>\nRetrieving speedtest.net configuration...<br \/>\nTesting from Telmex Colombia S.A. (186.81.100.136)...<br \/>\nRetrieving speedtest.net server list...<br \/>\nSelecting best server based on ping...<br \/>\nHosted by Ufinet (Quito) [462.24 km]: 93.804 ms<br \/>\nTesting download speed................................................................................<br \/>\nDownload: 89.73 Mbit\/s<br \/>\nTesting upload speed......................................................................................................<br \/>\nUpload: 92.11 Mbit\/s<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_11075\" class=\"pvc_stats all  \" data-element-id=\"11075\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>PS C:\\Users\\steve&gt; wsl.exe --list --online The following is a list of valid distributions that can be installed. Install using 'wsl.exe --install &lt;Distro&gt;'. NAME FRIENDLY NAME Ubuntu Ubuntu Ubuntu-24.04 Ubuntu 24.04 LTS openSUSE-Tumbleweed openSUSE Tumbleweed openSUSE-Leap-16.0 openSUSE Leap 16.0 SUSE-Linux-Enterprise-15-SP7 SUSE Linux Enterprise 15 SP7 SUSE-Linux-Enterprise-16.0 SUSE Linux Enterprise 16.0 kali-linux Kali Linux Rolling Debian Debian <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wsl2-install-in-win11-powershell\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 WSL2 Install in Win11 Powershell<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-11075","post","type-post","status-publish","format-standard","hentry","category-post"],"a3_pvc":{"activated":true,"total_views":10,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/11075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=11075"}],"version-history":[{"count":7,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/11075\/revisions"}],"predecessor-version":[{"id":11083,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/11075\/revisions\/11083"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=11075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=11075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=11075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}