|
|
|
|
|
by nickjj
1910 days ago
|
|
clip.exe works to and from WSL 2. But if you run VcXsrv you can use the native Linux clipboard and have it shared between WSL 2 and Windows. This is what I do because then tools like Vim, the pass utility and other command line tools can write to and read from the native Linux clipboard and everything will work out of the box. If you wanted to reproduce pbcopy / pbpaste in native Linux or WSL 2 you can set up aliases for: alias pbcopy="xclip -selection clipboard"
alias pbpaste="xclip -o"
And in case you don't already have xclip installed in WSL 2, you can apt-get install xclip or use whatever package manager you have. I can't remember if xclip is installed by default in WSL 2 distros. |
|