32

I like to use utilities like pbpaste on mac and xclip on linux to copy from the command line to the clipboard. I'm using windows system for linux (WSL). Is there any way of getting this behaviour from WSL. That is, I want a command line CLIP so that if I run the following in a WSL linux command line the output is written to clipboard:

ls | CLIP
Att Righ
  • 910
  • 1
  • 9
  • 18

2 Answers2

44

You may call Windows executables in WSL, only that you need the full file-name:

ls | clip.exe

Note that, unlike under Windows, the .exe part is required in WSL.

harrymc
  • 498,455
-1

try this

ls | clipcopy
clippaste

can use on Windows with ctrl+V

Dominique
  • 2,373
liubin
  • 1