Quick Linux Copy/Paste Tip

This is just proof that you can learn something new about Linux everyday.

So, are you tired of trying to copy and paste information from one source to another by means of pressing Ctrl+C and Ctrl+V? Or better still, by right click -> copy and right click -> paste?

Well, there’s a much easier way to do this. No seriously! I just found out about it myself after trying to track down where this bug or accidental copy-n-paste was coming from.

Once you learn to use this, however, it becomes very useful and will most likely replace your keyboard shortcut method. It may even be a cool trick you can tell your friends about. ;)

You see, normally if you want to copy text or anything else from point A to point B you will be using a copy method that stores that data into the clipboard, holding it until it is replaced by the next copy.

With this method, oddly enough, what you already have stored in the clipboard is not altered at all!

The method I’m talking about is copy-n-pasting via middle clicking (that scroll wheel on your mouse of course). Here’s how it works.

When you select any text (any text at all) in Linux, you may not know it, but it is being stored in a clipboard of it’s own. To access that clipboard to paste from it, all you have to do is middle click!

To try this out, select the text here in bold red and press Ctrl-C or right click -> copy. This stores that text in the clipboard that you’re used to.

Now, select the text here in bold blue (it doesn’t matter if you leave it selected or not, it works either way). Now, go down to the comments section of this post and middle click in that text area.

If you’re in Linux you’ll most likely see that it pastes “bold blue” into the text area (color and font weight won’t appear in that simple text area). Now press Ctrl+V or right click -> paste and you should see that it pastes “bold red” into the comment text area!

If you see both items pasted into the text area, then that means you can take advantage of both clipboards as well as a faster method of copying data!

It may take a little time to become familiar with it, however, I’ve not been using it long at all and it’s already nearly replaced the old method for me entirely!