Copy output from terminal directly to your clipboard! (Linux)

Copy output from terminal directly to your clipboard! (Linux)

PROBLEM: It is difficult to copy and past outputs from and to terminal
SOLUTION: Use xclip!

Install xclip

To install xclip on Ubuntu just use apt get, on other use the equivalent command.

Basic commands

To copy output to your clipboard, just simply use | xclip (| means, everything before pipe is input for command after pipe)like this:

And you have content of myfile in your clipboard!
To paste from your clipboard, just use:

Advanced strategy!

To work better with xclip, you can use aliases to work faster 🙂

In use case:

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments