Copy and Paste Text into the Terminal on Ubuntu 22.04

Copying and pasting text into the Linux terminal on Ubuntu 22.04 can help any Linux user when following any kind of Linux tutorial which requires the user to copy specific commands from the tutorial into the terminal.

In this tutorial, you will learn various methods that can be used to copy and paste text to and from the terminal on Ubuntu 22.04 Jammy Jellyfish Linux.

In this tutorial you will learn:

  • How to copy and paste text into the terminal
  • How to copy and paste text from the terminal
Copy and Paste Text into the Terminal on Ubuntu 22.04
Copy and Paste Text into the Terminal on Ubuntu 22.04
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Copy and Paste Text into the Terminal on Ubuntu 22.04 step by step instructions



  1. The first and preferred way to copy and paste text between the terminal window and any other application which allows text highlighting is to use mouse middle button (or scroll wheel). To copy and paste text into the terminal simply highlight any text you wish to copy. Then move to the terminal window and press the mouse middle button.

    The beauty and simplicity of this method is that it works the same way when you copy and paste text from the terminal to any other application such as text editor, browser etc.

  2. If the above copy and paste method does not work for you for some reason, you can use the mouse right button instead. First highlight the text you wish to copy. Then, press right mouse button and select Copy. Once ready, right click anywhere in the terminal window and select Paste to paste the previously copied text.
    The right click context menu shows the paste option in terminal
    The right click context menu shows the paste option in terminal
  3. If you are used to copy and paste text using shortcuts Ctrl + C and Ctrl + V respectively, know that this method also works on Ubuntu 22.04 Desktop but it does not work when you include terminal into the mix. The only difference here is that when dealing with the terminal, whether you copy or paste, you also need to include the Shift key into the process.

    So for example, to paste text into the terminal you need to press Ctrl + Shift + V. Conversely, to copy text from the terminal the shortcut is Ctrl + Shift + C.



Closing Thoughts

In this tutorial, you saw how to copy and paste text to and from the Linux terminal on Ubuntu 22.04 Jammy Jellyfish Linux. This included several methods, the easiest one being the middle scroll wheel. This can be confusing to newcomers who expect typical keyboard shortcuts to work, since the Linux command line uses those shortcuts for other functions.