Skip to content

poterba/wsl-sk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSL-SK: Windows Subsystem for Linux Starter Kit

How to setup WSL with GUI?

Usage

start.cmd launches WSL session and XServer simultaniously. It'll try to deduce session/windows manager to be launched.

stop.cmd stops LxssManager, which is equal to Linux subsystem shutdown.

Installation

WSL

You'll need Powershell with Administrative privileges

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all

Enter 'Y' to restart your system.

For WSL2 you'll need Hyper-V:

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
  • Install any distributive via Store or using Powershell (e.g. Ubuntu 18.04):
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu.appx -UseBasicParsing

After installation, you'll be able to run wsl and bash.

Upgrade to WSL2:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

X-server

Install X-server for Windows (for example, VcXsrv or Xming).

choco install vcxsrv
# or
choco install xming

To connect WSL to it we should start it in background. The simpliest way to do that is to run wscript with actual Visual Basic script as argument (startup script creates it in temporary directory).

x32 support

WSL has issues with x32 architecture support - you can use this solution:

sudo apt install -y qemu-user-static
sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
# unfortunately you should run this command @ every session start:
sudo service binfmt-support start

About

WSL Starter Kit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published