Find the link of Ubuntu userspace file for WSL

0

From Windows 10 Anniversary update , Microsoft added Windows Subsystem for Linux. Microsoft articles provide Lxrun.exe /install /y or bash.exe commands to install Ubuntu WSL. Then Lxrun.exe downloads Ubuntu userspace from Microsoft server.
So how can I get that download link without connecting to internet?

Biswapriyo

Posted 2017-10-18T18:57:03.387

Reputation: 6 640

Answers

1

Enable Developer Mode in Settings app (not required from v1709) and Windows SubSystem Linux feature from OptionalFeatures.exe. After rebooting, go to C:\Windows\System32 folder and copy LxRun.exe anywhere.

Procedure 1

Download Strings from SysInternals and place strings.exe & LxRun.exe in same folder. Open command prompt, type this command strings.exe LxRun.exe | find "http". See URLs details below.

Strings.exe_URL_Find

Procedure 2

Open that LxRun.exe in IDA Disassembler. Open Strings Windows with Shift+F12 in IDA. Find the URLs start with https://go.microsoft.com and copy them. See URLs details below.

  • For Windows Version 1607

IDA_LxRun_RS1

  • For Windows Version 1703 and 1709

IDA_LxRun_RS3

URLs Details

Find the redirected URLs with Curl --head command. Ubuntu 16.04 link provided in both ver.1703 and ver.1709.

URL_Details

Biswapriyo

Posted 2017-10-18T18:57:03.387

Reputation: 6 640