DEV Community

Connor Bode
Connor Bode

Posted on

Pipe to Clipboard in Linux

Well, this is a pretty quick tip but if you can memorize this one you'll be happy in the terminal.

Let's say you want to copy the output of a command to your clipboard. What do you do? Use xclip.

For example, I just needed to add my public SSH key to my Digital Ocean account.

cat ~/.ssh/ | xclip -sel clip

That's it, now you can ctrl + v your SSH key. WIN!

Follow me on or on Twitter for more quick tips!

Top comments (0)