Pressing Ctrl+V in a Linux terminal often results in nothing happening, but the solution is simpler than you might think. If you’ve ever wondered how to paste in terminal linux, you’re not alone—it’s one of the most common questions for new Linux users.
The good news is that pasting in a Linux terminal is easy once you know the right shortcuts. This guide will walk you through every method, from basic keyboard combos to advanced tricks.
Why Ctrl+V Doesn’t Work In Linux Terminal
In most Linux terminal emulators, Ctrl+V is reserved for a different function. It’s used to insert special characters or to “quote” the next keypress. This is a legacy from the Unix days.
Instead of pasting, the terminal waits for the next key you press. This behavior confuses many newcomers who are used to Windows or macOS shortcuts.
But don’t worry—there are several easy alternatives. You just need to learn the right key combinations for your terminal.
How To Paste In Terminal Linux Using Keyboard Shortcuts
The most common way to paste is using Ctrl+Shift+V. This works in almost every Linux terminal emulator, including GNOME Terminal, Konsole, and Xterm.
Here’s a quick comparison of shortcuts across different systems:
- Ctrl+Shift+V – Works in GNOME Terminal, Konsole, Xterm, and most modern terminals
- Shift+Insert – An older but universal shortcut that also works
- Ctrl+Shift+Insert – Another alternative for some terminals
- Right-click + Paste – Works in many GUI-based terminals
Try Ctrl+Shift+V first. It’s the most reliable method for most users.
Using Shift+Insert For Pasting
Shift+Insert is an older shortcut that still works in many terminals. It’s especially useful if you’re using a terminal that doesn’t support Ctrl+Shift+V.
To use it:
- Copy your text using Ctrl+Shift+C or right-click copy
- Click inside the terminal window
- Press Shift+Insert
This method is consistent across many Linux distributions. It’s a good fallback if Ctrl+Shift+V doesn’t work.
Pasting With The Mouse
Most Linux terminal emulators support mouse-based pasting. Simply right-click inside the terminal and select “Paste” from the context menu.
Some terminals also support middle-click pasting. If you have a three-button mouse, click the middle button (or scroll wheel) to paste the last selected text.
Middle-click pasting is a powerful feature. It pastes whatever text you last highlighted, even if you didn’t explicitly copy it.
How To Paste In Terminal Linux Using The Right-Click Menu
If you prefer using the mouse, the right-click menu is your friend. Here’s how it works in popular terminals:
- GNOME Terminal – Right-click and choose “Paste”
- Konsole – Right-click and select “Paste”
- Xterm – Right-click and choose “Paste” (or middle-click)
- Terminator – Right-click and select “Paste”
This method is intuitive and works even if you forget keyboard shortcuts. It’s perfect for beginners.
How To Paste In Terminal Linux With Tmux Or Screen
If you use terminal multiplexers like tmux or screen, pasting works differently. These tools have their own copy-paste buffers.
Pasting In Tmux
In tmux, you first need to enter copy mode. Then you can paste using the default prefix key:
- Press Ctrl+b (the default prefix)
- Press ] to paste from the tmux buffer
- Alternatively, use Ctrl+Shift+V if your terminal supports it
Tmux also supports mouse-based pasting if you enable the mouse option in your configuration.
Pasting In GNU Screen
In GNU Screen, pasting is similar:
- Press Ctrl+a (the default prefix)
- Press ] to paste from the screen buffer
- Or use Ctrl+Shift+V for terminal-level pasting
Both tmux and screen allow you to paste text that was copied within their environments. This is useful for long sessions.
How To Paste In Terminal Linux Using The Clipboard
Linux terminals interact with the system clipboard in different ways. Understanding this helps you paste more effectively.
The Primary Clipboard
Linux has a “primary” clipboard that stores text you highlight with the mouse. You don’t need to press any copy shortcut—just select the text.
To paste from the primary clipboard:
- Middle-click the mouse button inside the terminal
- Or press Shift+Insert (in some terminals)
This is very fast for quick copy-paste operations. Many experienced Linux users rely on this method exclusively.
The Clipboard Clipboard
The “clipboard” clipboard is the one you use with Ctrl+C and Ctrl+V in graphical applications. In the terminal, you use Ctrl+Shift+C and Ctrl+Shift+V to access it.
To paste from the clipboard clipboard:
- Press Ctrl+Shift+V
- Or right-click and select “Paste”
This clipboard is separate from the primary one. They don’t interfere with each other.
How To Paste In Terminal Linux With Xclip Or Xsel
For advanced users, command-line tools like xclip and xsel give you more control over pasting. These tools let you paste from the command line itself.
Using Xclip
First, install xclip if you don’t have it:
sudo apt install xclip (on Debian/Ubuntu)
Then paste text from the clipboard:
xclip -o -selection clipboard
Or paste from the primary selection:
xclip -o -selection primary
You can also pipe this output directly into commands. For example:
xclip -o | grep "search term"
Using Xsel
Xsel is similar to xclip. Install it with:
sudo apt install xsel
To paste from the clipboard:
xsel --clipboard --output
To paste from the primary selection:
xsel --primary --output
These tools are powerful for scripting and automation. They let you integrate clipboard content into shell scripts.
How To Paste In Terminal Linux Without Using The Mouse
If you prefer keyboard-only workflows, here are some tips:
- Use Ctrl+Shift+V for standard pasting
- Use Shift+Insert as a backup
- In tmux, use Ctrl+b + ]
- In screen, use Ctrl+a + ]
- Use xclip or xsel from the command line
These methods keep your hands on the keyboard. They’re faster once you memorize them.
Common Problems When Pasting In Linux Terminal
Sometimes pasting doesn’t work as expected. Here are common issues and solutions:
Pasting Adds Extra Characters
If pasting adds extra spaces or characters, your terminal might be interpreting the paste as typed input. This happens with some SSH connections.
Solution: Use Ctrl+Shift+V instead of middle-click. Or enable “bracketed paste” mode in your terminal settings.
Pasting Is Slow
Slow pasting can occur with large amounts of text. This is often due to network latency in SSH sessions.
Solution: Use a tool like cat with a here-document to paste large blocks of text. Or use ssh -X for X11 forwarding.
Pasting Doesn’t Work In Vim Or Nano
In terminal text editors like vim or nano, pasting can behave differently. You might need to enter insert mode first.
In vim: Press i to enter insert mode, then paste with Ctrl+Shift+V or Shift+Insert.
In nano: Just paste directly—nano accepts pasted text by default.
How To Paste In Terminal Linux With Different Terminal Emulators
Different terminal emulators have slight variations. Here’s a quick guide:
| Terminal | Paste Shortcut |
|---|---|
| GNOME Terminal | Ctrl+Shift+V, Shift+Insert, Right-click |
| Konsole | Ctrl+Shift+V, Shift+Insert, Right-click |
| Xterm | Shift+Insert, Middle-click |
| Terminator | Ctrl+Shift+V, Shift+Insert, Right-click |
| Alacritty | Ctrl+Shift+V, Shift+Insert |
| Kitty | Ctrl+Shift+V, Shift+Insert |
Most modern terminals support Ctrl+Shift+V. Older ones like Xterm may rely on Shift+Insert or middle-click.
How To Paste In Terminal Linux With SSH
When you’re connected to a remote server via SSH, pasting works the same way. The terminal on your local machine handles the paste.
However, some SSH clients have their own shortcuts. For example:
- PuTTY (on Windows) – Right-click pastes
- OpenSSH (on Linux) – Uses your local terminal shortcuts
- MobaXterm – Uses Ctrl+Shift+V or right-click
If you’re using SSH from a Linux terminal, just use the same shortcuts you normally would.
How To Paste In Terminal Linux With Wayland
Wayland is a newer display protocol that replaces X11. In Wayland, clipboard handling is slightly different.
Most Wayland-compatible terminals (like GNOME Terminal or Alacritty) still support Ctrl+Shift+V. However, middle-click pasting may not work in all Wayland compositors.
If middle-click doesn’t work, try using the clipboard clipboard instead. The wl-clipboard package provides command-line tools like wl-paste for Wayland.
Install it with:
sudo apt install wl-clipboard
Then use:
wl-paste
This works similarly to xclip but for Wayland.
How To Paste In Terminal Linux With Copy-Paste From Web Browsers
Copying text from a web browser and pasting it into the terminal is a common task. Here’s how to do it smoothly:
- Select the text in your browser
- Press Ctrl+C (or right-click and copy)
- Click inside the terminal
- Press Ctrl+Shift+V (or right-click and paste)
If the text includes formatting, it might not paste cleanly. Use a plain-text editor like Notepad to strip formatting first.
For code snippets, many websites have a “Copy” button that copies plain text. Use that when available.
How To Paste In Terminal Linux With Large Amounts Of Text
Pasting large blocks of text can be slow or cause issues. Here are some tips:
- Use
catwith a here-document:cat << 'EOF' > file.txt - Use
echowith redirection:echo "text" > file.txt - Use a text editor like nano or vim to paste directly
- Use
xcliporxselto pipe text into commands
For very large pastes, consider using a file transfer tool like scp or rsync instead.
How To Paste In Terminal Linux With Special Characters
Pasting text with special characters (like tabs, newlines, or control characters) can cause unexpected behavior.
To paste special characters safely:
- Use Ctrl+Shift+V, which usually handles them correctly
- Enable “bracketed paste” mode in your terminal
- Use a here-document to avoid interpretation
Bracketed paste mode tells the terminal that the incoming text is a paste, not typed input. This prevents auto-indentation and other issues.
Enable it in your terminal settings or add this to your shell configuration:
set enable-bracketed-paste on
How To Paste In Terminal Linux With Multiple Lines
Pasting multiple lines of text is straightforward. Just copy the entire block and paste it as usual.
However, some commands execute immediately after each newline. To avoid accidental execution:
- Paste into a text editor first, then run the command
- Use a here-document to paste multiple lines safely
- Enable bracketed paste mode
For example, to paste a multi-line script:
cat << 'EOF' > script.sh
#!/bin/bash
echo "Hello"
EOF
Then run bash script.sh.
Frequently Asked Questions
Why Doesn’t Ctrl+V Work In Linux Terminal?
Ctrl+V is reserved for inserting special characters. Use Ctrl+Shift+V or Shift+Insert instead for pasting.
How Do I Paste In Terminal Linux Without A Mouse?
Use Ctrl+Shift+V or Shift+Insert. In tmux, use Ctrl+b + ]. In screen, use Ctrl+a + ].
What Is The Difference Between Primary And Clipboard In Linux?
The primary clipboard stores text you highlight with the mouse. The clipboard clipboard stores text you copy with Ctrl+C. They are separate.
How Do I Paste In Terminal Linux Using The Middle Mouse Button?
Simply click the middle mouse button (or scroll wheel) inside the terminal. This pastes from the primary clipboard.
Can I Paste In Terminal Linux With SSH?
Yes, pasting works the same way over SSH. Use your local terminal’s shortcuts, like Ctrl+Shift+V.
Final Tips For Pasting In Linux Terminal
Mastering paste in the Linux terminal saves you time and frustration. Here are my final recommendations:
- Learn Ctrl+Shift+V first—it’s the most universal shortcut
- Use Shift+Insert as a reliable backup
- Try middle-click for quick pastes from highlighted text
- Install xclip or xsel for command-line pasting
- Enable bracketed paste mode to avoid issues
With practice, these methods become second nature. You’ll wonder why you ever struggled with pasting in the first place.
Remember, the Linux terminal is powerful once you learn its quirks. Pasting is just one small part of the journey.
Now go ahead and try these methods. Open your terminal, copy some text, and paste it using Ctrl+Shift+V. You’ll see how easy it really is.
If you still have trouble, check your terminal emulator’s documentation. Each one has slight variations, but the core methods are the same.
Happy pasting!