Tag Archives: wsl

Accessing Hyper-V from WSL

Forwarding is disabled by default:

Get-NetIPInterface | Select-Object ifIndex,InterfaceAlias,ConnectionState,Forwarding
ifIndex InterfaceAlias                     ConnectionState Forwarding
------- --------------                     --------------- ----------
     57 vEthernet (WSL (Hyper-V firewall))       Connected   Disabled
     38 vEthernet (Default Switch)               Connected   Disabled
     17 Ethernet 2                            Disconnected   Disabled
     14 Local Area Connection* 10             Disconnected   Disabled
     22 Local Area Connection* 9              Disconnected   Disabled
     18 OpenVPN Connect DCO Adapter           Disconnected   Disabled
      7 Wi-Fi                                    Connected   Disabled
      5 Local Area Connection                 Disconnected   Disabled
      1 Loopback Pseudo-Interface 1              Connected   Disabled
     57 vEthernet (WSL (Hyper-V firewall))       Connected   Disabled
     38 vEthernet (Default Switch)               Connected   Disabled
     17 Ethernet 2                            Disconnected   Disabled
     14 Local Area Connection* 10             Disconnected   Disabled
     22 Local Area Connection* 9              Disconnected   Disabled
     18 OpenVPN Connect DCO Adapter           Disconnected   Disabled
      7 Wi-Fi                                    Connected   Disabled
      5 Local Area Connection                 Disconnected   Disabled
      1 Loopback Pseudo-Interface 1              Connected   Disabled
(more…)

Exporting and importing WSL distributions

Exporting

In PowerShell:

wsl --export Ubuntu Ubuntu-01.tar

where Ubuntu is the distro name.

Importing

wsl --import UbuntuA C:\Users\dmitriano\wsl\UbuntuA Ubuntu-24.01.tar

probably the folder C:\Users\dmitriano\wsl\UbuntuA should exist.

(more…)

How Russians use CLion with WSL on Windows 11

Configuring WSL

First they run a VPN client on the host machine and then they go to user’s folder:

cd %UserProfile%

create .wslconfig file with the following content:

[wsl2]
memory=30GB
swap=10GB

networkingMode=mirrored
dnsTunneling=true
autoProxy=true
(more…)

Running v2rayN client on WSL

unzip /mnt/c/Users/dmitr/Downloads/v2rayN-linux-64.zip
sudo apt install libice6 libsm6
./v2rayN &
curl -s https://api.ipify.org
(more…)

Increasing WSL2 memory limits

Go to user’s folder:

cd %UserProfile%

create .wslconfig file with the following content:

[wsl2]
memory=30GB
swap=10GB
(more…)

Running GUI apps on WSL

Updating existing WSL installation

I updated WSL according to this MS guide:

wsl --update
wsl --shutdown
wsl --version
WSL version: 1.2.0.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2604
(more…)