linux subsystem for windows gui code example

Example 1: windows subsystem for linux

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Example 2: windows subsystem for linux

wsl --set-default-version 2

Example 3: Running Graphical Programs on Windows Subsystem on Linux

# Download Xming application for windows then run following command in Terminal of ubuntu
# You find Xming application for download for windows in following link--
#https://sourceforge.net/projects/xming/
$ export DISPLAY=localhost:0.0
# let's run eog graphical programm of linux to display image
$ eog something.jpg