How to copy text from the terminal to the clipboard.

How to copy and paste text from the terminal to the clipboard using the command line.