You can use program like xclip to copy the output of a command to clipboard in Linux.
Example:
Install xclip:
1 2 3 4 5 6 7 8 9 10 |
## Install xclip # Obtain the sourcecode git clone https://github.com/astrand/xclip.git ./bootstrap ./configure make make install ## Verify that is installed: man xclip |
Copy the output of a command or pipe to clipboard in Linux:
1 2 |
## Copy ps -aux | xclip -selection clipboard |
Paste from clipboard to the Linux terminal:
1 2 |
## Paste xclip -selection clipboard -o |