Install any GNU/Linux userspace in WSL
Install any GNU/Linux distribution userspace in Windows Subsystem for Linux (WSL) with compressed RootFS tarballs :package: (tar.gz) or with Docker containers :whale: or with ISO files :cd:
Clone this GitHub repository with this link https://github.com/Biswa96/WSLInstall.git .
Use MSBuild (or mingw-w64) to make executable file from project file(.vcxproj).
Or use the makefile in WslFunctions
folder. The project file only provides x64-Release version.
gendef /c/Windows/System32/wslapi.dll
lib /DEF:wslapi.def /MACHINE:X64
dlltool -D /c/Windows/System32/wslapi.dll -d wslapi.def -l libwslapi.a
wslapi export library was added in latest mingw-64 toolchain. See this commits for further details:
WslInstall.exe
and {distribution}.tar.gz
files in that same folder.WslInstall.exe <distro_name> <distribution.tar.gz>
. Always put a space
between the two command arguments like between <distro_name> and <distribution.tar.gz>.wslconfig.exe /list /all
command. Also you may see a rootfs
folder in that
directory where you want to install.WslRegisterDistribution
function from wslapi.dll
file. Then it passes
the provided two commandline arguments in distroName
and in tarGzFilename
string parameters of that function respectively and the imported function
installs that distribution. See details of WSL Functions and WSL_DISTRIBUTION_FLAGS.Docs:
Tools:
\\wsl$
path.This project is licensed under GNU General Public License v3 or higher. See LICENSE for more details. You are free to study, change, modify the source code and make your own version and publish that.