Linux users that are new to using the command line terminal will quickly realize that the typical and well known
Ctrl + C and
Ctrl + V keyboard shortcuts do not work for copying and pasting. Instead,
Ctrl + C will interrupt a running command, so users must quickly make new habits and learn the proper way to copy and paste into the terminal. In this tutorial, we will show you all the ways to paste your clipboard into the terminal on a Linux system. We will also go over a few ceveats that you may need to know.
In this tutorial you will learn:
- How to paste text into terminal via keyboard shortcut
- How to paste text via right click context menu
- How to paste text via mouse button shortcut
- How to copy text from terminal with mouse or keyboard
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux distro|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to paste into terminal
Here are the various ways to paste your clipboard into a Linux terminal, and other various keyboard shortcuts or information that will also be relevant.
Ctrl + Ckeyboard shortcut, which sends an interrupt signal on Linux, was around before it was ever used by other applications and operating systems as a method to copy text or files to a clipboard. So, you will find that
Ctrl + Cand
Ctrl + Vwork in all other contexts on your Linux system, but not in the terminal.
- To paste copied text into your Linux terminal, use the
Ctrl + Shift + Vkeyboard combination. In other words, hold down
Shiftsimultaneously, and then tap the
Vkey, and your copied text will be pasted into the terminal.
- In the case that you are on a system that will also accept mouse input, you can click on the middle scroll wheel button to paste your copied text. Rather than going through the usual process of copying text, you can just highlight whatever you want in your terminal, then click the middle mouse button to paste it.
- It is also handy to know that the
Ctrl + Shift + Ckeyboard combination will copy any highlighted text to your clipboard, which can then be pasted later.
- If you are using a desktop environment, such as GNOME, you should be able to right click in your terminal emulator and access both the copy and paste functions.
- Your terminal emulator also most likely has a menu that contains both the copy and paste functions in it. Check the drop down menu to see if this option is there.
- Note that various terminals may have differently configured keyboard shortcuts. The
Ctrl + Shift + Vkeyboard combination should work in almost all possible scenarios, but you will need to check your terminal emulator to see if this shortcut is configured, or to set up your own custom one.
In this tutorial, we saw how to paste text into the command line terminal on a Linux system. For new users, it is common to keep trying
Ctrl + Cand
Ctrl + V, before realizing that these shortcuts do not do what you think they should. After learning the proper keyboard shortcuts and alternative methods mentioned here, you will be able to quickly and efficiently manipulate text in your terminal. Just remember to check your terminal emulator’s settings for more configuration.