Last Updated: February 25, 2016
·
976
· patrickocoffeyo

Linux pipe to clipboard

I use my clipboard a lot. This is simple, but has saved me a lot of time.

In your ~/.bashrc (or ~/.zshrc, whatever you use):

alias cb="xclip -sel clip"

Use:

command-with-output | cb

Of course, you'll need xclip installed to use this alias.