Copy Command Output To Linux Clipboard Directly

Refer: https://www.cyberciti.biz/faq/xclip-linux-insert-files-command-output-intoclipboard/

In order to put it on the global clipboard and just not the terminal clipboard.

alias cbcopy='xclip -selection clipboard'
alias cbpaste='xclip -selection clipboard -o'

Installation

sudo apt-get install xclip

How do I use the xclip command for clipboard copy and paste?

Let us copy the output of the following command to the Linux clipboard. The syntax is:

command | xclip
command | xclip -i

To paste selection to standard out or pipe, use the following command again:

xclip -o
xclip -o | myapp1 -arg1