Skip to content

Connecting Remote desktop for WSL2 πŸ–₯️

πŸ“ Prerequisites

  • Ubuntu 20.04 LTS installed on WSL2
  • Windows Machine

And thats about it πŸ˜‰ !

Install Ubuntu If you haven't installed Ubuntu 20.04 LTS on WSL2, you can follow the steps here

πŸ“₯ Installing Remote Desktop Support tools

On Ubuntu

Terminal window
sh -c "$(curl -fsSL https://abhijithganesh.com/remote.sh)"

On Windows

There’s nothing to do on Windows because remote desktop is already installed on Windows by default.

πŸš€ Connecting to WSL2 from Windows

The shell script should already have a GUI instance for you, check it using:

Terminal window
sudo /etc/init.d/xrdp status

Output

Terminal window
$ sudo /etc/init.d/xrdp status
* xrdp-sesman is running
* xrdp is running

If you see the above output, you can connect to WSL2 from Windows using the Remote Desktop Connection app.

πŸƒβ€β™‚οΈOpen run and type mstsc and hit enter

Windows run

πŸ–₯️ Connect to localhost:3390

It will show warnings but you can click on yes to continue

Windows RDP connect

Remote view πŸ‘“

RDP view

Input your credentials and you’ll be through.

Congratulations πŸŽ‰

You have successfully connected to WSL2 from Windows using Remote Desktop Connection.

Image