<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Wsl2_new</id>
	<title>Wsl2 new - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=Wsl2_new"/>
	<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Wsl2_new&amp;action=history"/>
	<updated>2026-04-19T20:27:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=Wsl2_new&amp;diff=5364&amp;oldid=prev</id>
		<title>Busk at 17:46, 23 August 2024</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Wsl2_new&amp;diff=5364&amp;oldid=prev"/>
		<updated>2024-08-23T17:46:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:46, 23 August 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Install Ubuntu 22.04 instance&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;# WSL2 Install, Routing &amp;amp; Options&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;## &lt;/ins&gt;Install Ubuntu 22.04 instance&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;```&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;```&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l22&quot; &gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;```&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;```&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Routing fixes if needed&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;#&lt;/ins&gt;# Routing fixes if needed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;```&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;```&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$interfaceAlias = &amp;quot;vEthernet (WSL (Hyper-V firewall))&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$interfaceAlias = &amp;quot;vEthernet (WSL (Hyper-V firewall))&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=Wsl2_new&amp;diff=5363&amp;oldid=prev</id>
		<title>Busk: Created page with &quot;Install Ubuntu 22.04 instance  ``` $ErrorActionPreference = &quot;Stop&quot;  $distributionName = &quot;example1&quot; $distrib = &quot;ubuntu-22.04&quot;  $installLocation = &quot;C:\WSL\$distributionName&quot; $ta...&quot;</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=Wsl2_new&amp;diff=5363&amp;oldid=prev"/>
		<updated>2024-08-23T17:45:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Install Ubuntu 22.04 instance  ``` $ErrorActionPreference = &amp;quot;Stop&amp;quot;  $distributionName = &amp;quot;example1&amp;quot; $distrib = &amp;quot;ubuntu-22.04&amp;quot;  $installLocation = &amp;quot;C:\WSL\$distributionName&amp;quot; $ta...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Install Ubuntu 22.04 instance&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
$ErrorActionPreference = &amp;quot;Stop&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$distributionName = &amp;quot;example1&amp;quot;&lt;br /&gt;
$distrib = &amp;quot;ubuntu-22.04&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$installLocation = &amp;quot;C:\WSL\$distributionName&amp;quot;&lt;br /&gt;
$tarballUrl = &amp;quot;https://cloud-images.ubuntu.com/releases/jammy/release/${distrib}-server-cloudimg-amd64-root.tar.xz&amp;quot;&lt;br /&gt;
$tarballPath = &amp;quot;$env:TEMP\${distrib}.tar.gz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
wsl --set-default-version 2&lt;br /&gt;
&lt;br /&gt;
Invoke-WebRequest -Uri $tarballUrl -OutFile $tarballPath&lt;br /&gt;
&lt;br /&gt;
wsl --import $distributionName $installLocation $tarballPath&lt;br /&gt;
wsl -d $distributionName -u root -- bash -c &amp;quot;adduser --disabled-password --gecos '' newuser &amp;amp;&amp;amp; usermod -aG sudo newuser&amp;quot;&lt;br /&gt;
wsl -d $distributionName -- bash -c &amp;quot;echo -e '[user]\ndefault=newuser' &amp;gt; /etc/wsl.conf&amp;quot;&lt;br /&gt;
# Remove-Item $tarballPath&lt;br /&gt;
Write-Output &amp;quot;WSL distribution '$distributionName' with $distrib has been installed and configured.&amp;quot;&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
# Routing fixes if needed&lt;br /&gt;
```&lt;br /&gt;
$interfaceAlias = &amp;quot;vEthernet (WSL (Hyper-V firewall))&amp;quot;&lt;br /&gt;
$interfaceName = &amp;quot;usb&amp;quot;&lt;br /&gt;
$vpnInterfaceRegex = &amp;quot;PANGP*&amp;quot;&lt;br /&gt;
$vpnDNS = &amp;quot;10.x.x.y&amp;quot;&lt;br /&gt;
$ipOfDefaultGatewayIPRouteToDelete = &amp;quot;192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$ErrorActionPreference = &amp;quot;Stop&amp;quot;&lt;br /&gt;
&lt;br /&gt;
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] &amp;quot;Administrator&amp;quot;)) {&lt;br /&gt;
    $arguments = &amp;quot;&amp;amp; '&amp;quot; + $myInvocation.MyCommand.Definition + &amp;quot;'&amp;quot;&lt;br /&gt;
    Start-Process powershell -Verb runAs -ArgumentList $arguments&lt;br /&gt;
    exit&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Get-NetIPInterface -InterfaceAlias $interfaceAlias | Set-NetIPInterface -InterfaceMetric 1&lt;br /&gt;
Get-NetAdapter | Where-Object { $_.InterfaceDescription -like $vpnInterfaceRegex } | Set-NetIPInterface -InterfaceMetric 4000&lt;br /&gt;
&lt;br /&gt;
Set-DnsClientServerAddress -InterfaceAlias $interfaceName -ServerAddresses ($vpnDNS)&lt;br /&gt;
route delete 0.0.0.0 MASK 0.0.0.0 $ipOfDefaultGatewayIPRouteToDelete&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
</feed>