xclip Command Examples

X11 clipboard manipulation tool, similar to xsel. Handles the X primary and secondary selections, plus the system clipboard (Ctrl + C/Ctrl + V). See also: wl-copy. More information: https://manned.org/xclip.

echo 123 | xclip

echo 123 | xclip -selection {{primary|secondary|clipboard}}

echo 123 | xclip -sel clip

xclip -sel clip {{input_file.txt}}

xclip -sel clip -t image/png {{input_file.png}}

xclip -i

xclip -o

xclip -o -sel clip