X11 Windows Subsystem for Linux

Linux X11 GUI programs often work fine on Windows Subsystem for Linux. This procedure has been used for years on WSL1. WSL2 may need additional setup due to the more advanced network configuration of WSL2.


Install a Windows X11 server to enable graphical Linux applications on Windows as follows:

Install VcXsrv and add to WSL ~/.bashrc

export DISPLAY


To run any X11 Linux GUI app in WSL, start VcXsrv first from Windows. You don’t have to do this before starting WSL.


  • on WSL1, do NOT open a port in your firewall for X11 if asked by Windows.
  • old Xming X11 server