How can I get around using xclip in the Linux subsystem on Win 10?

See WSL issue #1069 for two workarounds:

Just to clarify for anyone who stumbles upon this thread, to use type cat filePath | clip.exe into the command prompt.
- JetStarBlues commented on Feb 8

Or:

I can confirm that having Xming running and configuring the DISPLAY env var is enough to make something go to the windows clipboard:

$ export DISPLAY=:0
$ echo 'some text' | xclip -selection clipboard

This works just fine. Apparently using the primary clipboard also works fine, so I'm guessing Xming will redirect both to the windows clipboard.
- mateusmedeiros commented on Sep 9, 2016


clip.exe < ~/.ssh/id_rsa worked for me to copy my ssh keys to github on WSL2.