すごくメモ帳

すごくほぼメモ帳ぐらいなブログ

WSL2 + XMING 設定

PowerShell (管理者)で以下のコマンドを実行

$ip = (Get-NetIPAddress -PrefixOrigin Dhcp).IPAddress
$wip = $ip.Trim() + ":0.0"
wsl -- echo -e -n "\nexport DISPLAY=$wip\n" `>`> ~/.bashrc
echo "$ip" > "C:\Program Files (x86)\Xming\X0.hosts"