WSL2: copy to clipboard.

This is a part of the 100 Days To Offload challenge.

I’m experimenting with Windows and WSL2 as my daily driver.

On Pop!_OS, I usually get my SSH key to clipboard with xclip:

cat ~/.ssh/ | xclip -sel copy

No surprise, it didn’t work on WSL2. The answer was quite simple in the end:

cat ~/.ssh/ | clip.exe

Join the discussion on Mastodon or Twitter, or write me an email.