How to Copy and Paste on Ubuntu: Complete Guide for GUI, Terminal, WSL, and Virtual Environments

1. What Is Copy & Paste on Ubuntu? [Basic Concepts and Environment Differences]

Why Copy & Paste Is Important on Ubuntu

On Ubuntu and other Linux-based operating systems, working with the terminal and switching between multiple applications is very common. In such environments, being able to perform copy and paste operations smoothly has a significant impact on overall productivity.

Especially when entering commands in the terminal or reusing code found on the internet, the ability to copy and paste efficiently can make a major difference.
Users who are accustomed to Windows or macOS may initially feel confused and think, “Why can’t I copy and paste on Ubuntu?” This happens because the operation methods are slightly different. Once you get used to them, however, they become very intuitive.

Copy & Paste Methods Vary by Environment on Ubuntu

Copy and paste behavior on Ubuntu depends on the environment you are using. It can generally be categorized into the following three types:

1. Desktop Environment (GUI)

This is the familiar window-based graphical interface.
Copy and paste using the mouse or shortcut keys (Ctrl+C / Ctrl+V) works in a way very similar to Windows and macOS.

Typical use cases:

  • Copying and pasting files
  • Moving text within text editors
  • Transferring data between web browsers

2. Terminal Environment (CLI)

The terminal (console) is the “black screen” frequently used by developers and intermediate to advanced users.
Copy and paste operations here use unique shortcut keys that require some practice.

  • Copy: Ctrl + Shift + C
  • Paste: Ctrl + Shift + V

Note: Ctrl + C is reserved for forcefully terminating a running process, so it cannot be used for copying.

3. Virtual Environments and Multi-OS Scenarios

In the following environments, additional configuration may be required:

  • Ubuntu running on VirtualBox (clipboard sharing with the host OS)
  • WSL (Windows Subsystem for Linux) copy and paste between Windows and Ubuntu

In these virtualized usage scenarios, standard copy and paste operations may not work out of the box, and extra settings or tools are often necessary.

If Copy & Paste Does Not Work, Check Your Environment First

If you feel that copy and paste is not working properly on Ubuntu, the first step is to confirm which environment you are currently using.

  • Is it a GUI or a terminal?
  • Or are you working in a virtual environment?

Understanding the correct method for each environment is the first step toward efficient work on Ubuntu.

2. How to Copy and Paste in the Desktop Environment (GUI)

Ubuntu provides a graphical desktop environment (GUI) that allows you to use the mouse and keyboard just like on Windows or macOS. Copy and paste operations in this environment feel very familiar. This section focuses on file operations and text copy and paste.

How to Copy and Paste Files

In the Ubuntu file manager (commonly “Nautilus”), you can copy and paste files using drag and drop, right-click menus, or keyboard shortcuts.

Using the Mouse

  1. Right-click the file you want to copy.
  2. Select “Copy” from the menu.
  3. Open the destination folder, right-click, and select “Paste”.

Using Keyboard Shortcuts

  • Copy: Ctrl + C
  • Cut: Ctrl + X
  • Paste: Ctrl + V

Tip:
“Copy” duplicates the file, while “Cut” moves it from the original location. Both actions use the same paste key (Ctrl + V).

Copy and Paste in Text Editors

Text editors such as Gedit, Pluma, or Kate support the same shortcuts as Windows.

Basic Shortcuts

  • Copy: Ctrl + C
  • Cut: Ctrl + X
  • Paste: Ctrl + V

Using the Mouse

  1. Select the text you want to copy.
  2. Right-click and choose “Copy” or “Cut”.
  3. Right-click at the destination and select “Paste”.

Hint:
Ubuntu also supports a Linux-specific feature where selected text is automatically copied, and you can paste it with the middle mouse button (wheel click). This works in the terminal and some applications.

Copy and Paste Between Applications

In the Ubuntu GUI, copying and pasting between applications such as browsers, office software, and editors works smoothly.

Examples include:

  • Copying code from a browser and pasting it into a text editor
  • Copying text from a PDF viewer and pasting it into email or chat tools

However, some applications may have clipboard limitations or bugs. In such cases, consider alternative methods like terminal-based clipboard tools.

The Desktop Environment Is the Best Place to Start

For users new to Ubuntu or Linux, it is best to first master copy and paste in the GUI environment. It is intuitive and easy to learn, making it an ideal entry point.

3. Copy and Paste in the Ubuntu Terminal (CLI)

The terminal is an essential tool for Ubuntu users. It is used for installing software, changing settings, and checking logs. However, copy and paste in the terminal follows different rules, which often confuses beginners.

This section explains basic shortcuts, mouse usage, and customization options.

Basic Terminal Shortcuts

In Ubuntu terminals such as GNOME Terminal, copy and paste use different shortcuts from the GUI.

Correct Key Combinations

  • Copy: Ctrl + Shift + C
  • Paste: Ctrl + Shift + V

Why Can’t You Use Ctrl + C?

In Linux and Unix environments, Ctrl + C is assigned to terminate the currently running process. Using it for copying would risk accidentally stopping commands.

Copy and Paste Using the Mouse

If you are not comfortable with shortcuts, you can also use the mouse.

Steps

  1. Select the text by clicking and dragging.
  2. Right-click and choose “Copy”.
  3. Right-click at the destination and choose “Paste”.

Note:
In some environments, simply selecting text automatically copies it, and you can paste it with the middle mouse button. This behavior is not guaranteed in all setups.

Customizing Terminal Shortcuts

Ubuntu allows you to customize terminal keyboard shortcuts. This is useful if you want to adapt them to your workflow.

Steps (GNOME Terminal)

  1. Open the terminal.
  2. Open “Preferences”.
  3. Select a profile and go to “Shortcuts” or “Keybindings”.
  4. Change the copy and paste shortcuts.

Mastering Copy & Paste Is the First Step to Terminal Proficiency

The fastest way to become comfortable with the Ubuntu terminal is to master copy and paste. Copying commands from online resources helps you learn efficiently.

4. Controlling the Clipboard from the Command Line (xsel / xclip)

As you become more experienced, you may want to copy command output directly or interact with the clipboard from scripts. Tools like xsel and xclip make this possible.

What Is xsel?

xsel is a lightweight tool that allows reading from and writing to the clipboard in X Window environments.

Installation

sudo apt update
sudo apt install xsel

Basic Usage

echo "Hello Ubuntu" | xsel --clipboard

Using xclip

sudo apt install xclip
echo "xclip test" | xclip -selection clipboard

When xsel or xclip Does Not Work

  • They do not work without an X environment (for example, on some WSL setups).
  • They cannot be used on servers without a GUI.

5. Copy & Paste in Virtual Environments and WSL

Ubuntu is often used in virtual machines or via WSL. In these cases, copy and paste may not work without proper configuration.

VirtualBox

You must install Guest Additions and enable bidirectional clipboard sharing.

WSL

Copy and paste behavior depends on the terminal you use, such as Windows Terminal or PowerShell.

echo "From WSL to clipboard" | clip.exe

6. Common Problems and Solutions

Most copy and paste issues on Ubuntu are caused by misunderstandings about the environment or shortcuts.

7. Frequently Asked Questions (FAQ)

This section answers common questions about copy and paste on Ubuntu.

8. Summary: Master Copy & Paste on Ubuntu

Once you understand how copy and paste works in each environment, Ubuntu becomes much more productive and enjoyable to use.

年収訴求