<p>
You can copy and paste on Linux the same way you do on any other OS: Ctrl+C to copy and Ctrl+V to paste (or use the Edit menu, or a right-click menu).
</p>

<p>
However, Linux doesn't limit you to just that.
The primary GUI environment of Linux (at the time of this recording) is X, and the <a href="https://www.x.org/releases/X11R7.7/doc/xorg-docs/icccm/icccm.html">Inter-Client Communication Conventions Manual</a> defines three <strong>X Selection</strong> states&#58; Primary, Secondary, and Clipboard.
The Secondary is rarely (if ever?) used, so I don't cover it here.
</p>

<h2>Primary</h2>

<p>
The primary X Selection is anything literally selected at any given moment.
If you highlight a word in Firefox with your mouse, for instance, then it becomes the Primary Selection, and it is owned by Firefox.
If you press the Middle Mouse Button in any application, then that application asks the owner (Firefox, in this example) for the data contained in the Primary Selection.
Firefox sends the data to that application so that it can paste it for you.
</p>

<p>
A Primary selection remains the Primary Selection until it is overwritten by a new Primary Selection.
In other words, text needn't be highlighted to be retained in the Primary Selection slot.
</p>


<h2>Clipboard</h2>

<p>
The Clipboard Selection is data that has explicitly been sent to the clipboard by a copy action.
This is usually a right-click &#62; Copy or a selection of Edit &#62; Copy.
When another application is told to paste from the clipboard, it pastes data from the Clipboard Selection.
</p>

<h2>Both</h2>

<p>
You can (and often do) have both a Primary Selection and a Clipboard selection.
If you press Ctrl+V, you get the contents of the Clipboard Selection.
If you press the middle mouse button, then you get the contents of the Primary Selection.
</p>

<h2>xsel</h2>

<p>
The <code>xsel</code> command allows you to retrieve the contents of an X Selection.
</p>

<pre><code>
$ xsel --primary
dungeons
$ xsel --clipboard
dragons
</code></pre>

<h2>Clipboard managers</h2>

Clipboard managers such as Klipper, CopyQ, <a href="https://parcellite.sourceforge.net/" target="_blank">Parcellite</a>, and so on, provide a history for your clipboard.
They track the latest 10 (or so) items you have copied or selected.
They can be a little confusing, because they do tend to blur the line between the Primary Selection and the Clipboard Selection, but now that you know the technical difference, it shouldn't confuse you to see them both listed by a clipboard manager designed to conflate them.
</p>

<h2>GPM</h2>

<p>
GPM is a daemon allowing you to use your mouse without a GUI.
Among its features, it permits you to select text in a text console (TTY) and then paste it with the middle mouse button.
</p>

<h2>GNU Screen and Tmux</h2>

<p>
Screen and tmux are &#34;window managers for text consoles&#34;.
I don't tend to use tmux as often as I should, having learnt GNU Screen long ago, so I'm not familiar with the process of copying and pasting with tmux.
For Screen, you can copy text in this way:
</p>

<ol>
<li><p>
Press Ctrl+A to get out of insert mode.
</p></li>
<li><p>
Press left-square_bracket to enter copy-mode
</p></li>
<li><p>
Move your text to the position you want to start selecting and press Enter or Return
</p></li>
<li><p>
Arrow to the position at which you want to end your selection and press Enter or Return again
</p></li>
</ol>

<p>
To paste your selection:
</p>

<ol>
<li><p>
Press Ctrl+A to get out of insert mode.
</p></li>
<li><p>
Press right-square_bracket to paste
</p></li>
</ol>



