Linux
xclip
Copy text directly from the terminal to the clipboard:
echo "Your text here" | xclip -sel clip
Copy a file’s contents to the clipboard:
xclip -in textfile.txt -sel clip
Copy text directly from the terminal to the clipboard:
echo "Your text here" | xclip -sel clip
Copy a file’s contents to the clipboard:
xclip -in textfile.txt -sel clip