When you transition from a graphical desktop environment like Windows or macOS to the Ubuntu Linux command line, one of the most frustrating early experiences is discovering that your standard keyboard shortcuts do not work. If you try to paste a copied command using Ctrl + V, the terminal will often simply print a strange character (like ^V) to the screen instead of pasting your text.
This happens because the terminal is a legacy environment where the Ctrl key has historically been reserved for sending special control signals directly to running programs (for example, Ctrl + C is used to forcefully kill a running script, not to copy text). Fortunately, Ubuntu provides several dedicated methods for copying and pasting safely within the terminal.
Method 1: The Terminal Keyboard Shortcuts
To prevent conflicts with legacy control signals, the GNOME Terminal (the default terminal emulator in Ubuntu) simply adds the Shift key to the standard copy/paste shortcuts you already know.
To Copy Text:
- Use your mouse to highlight the text inside the terminal window.
- Press Ctrl + Shift + C simultaneously.
To Paste Text:
- Place your cursor where you want the text to appear.
- Press Ctrl + Shift + V simultaneously.
This works for text copied from inside the terminal itself, as well as text copied from an external application like a web browser (where you used the standard Ctrl + C to copy it initially).
Method 2: The Right-Click Menu
If you prefer not to memorise new keyboard shortcuts, the mouse works exactly as it does in any other graphical application.
- Highlight the text you wish to copy.
- Right-click the highlighted text and select Copy from the context menu.
- Move to where you want to insert the text, Right-click the empty space, and select Paste.
Method 3: The Middle-Click Highlight (Fastest)
Linux features a unique, global clipboard system known as the “primary selection.” This system operates completely independently of the standard Ctrl+C clipboard and is beloved by power users for its incredible speed.
- Using your mouse, simply click and drag to highlight a string of text. (You do not need to press copy, right-click, or use a keyboard shortcut. The mere act of highlighting the text automatically copies it to the primary clipboard).
- Move your mouse to where you want the text to go (this can be in the same terminal, a different terminal tab, or even a text editor).
- Press down on your Middle Mouse Button (the scroll wheel) to instantly paste the highlighted text.
This highlight-and-middle-click workflow allows you to move snippets of code between windows in fractions of a second, without your fingers ever needing to touch the keyboard.