How to Enable Middle Click Paste in Ubuntu

One of the most revered productivity features across X11 and modern Wayland Linux desktops is primary selection pasting. By highlighting any snippet of text with your mouse cursor and clicking the middle mouse button (or pressing down on the scroll wheel), the selected text is instantly pasted into another application or terminal window without pressing Ctrl + C and Ctrl + V. In recent releases of Ubuntu, this feature may be disabled by default on certain laptop touchpads or fresh desktop installations.

Why Middle-Click Paste Enhances Desktop Speed

Primary selection pasting fundamentally alters text handling on Linux:

  • Dual Clipboard Architecture: The primary selection buffer operates independently of your main clipboard. You can keep a permanent snippet stored on Ctrl + C while using middle-click to rapidly transfer intermediate text between windows.
  • Zero Keyboard Interruption: Ideal for mouse-heavy data entry, code review, and web browsing tasks where taking hands off the mouse interrupts workflow.
  • Instant Terminal Injection: Pastes directly into standard bash and zsh terminal prompts without requiring right-click context menus.

Method 1: Enable Middle Click Paste via GNOME Tweaks (Recommended)

GNOME Tweaks provides a direct graphical interface to toggle primary selection behaviour across all desktop environments:

  1. Open the Ubuntu Software centre or open a terminal window and install GNOME Tweaks if you have not already done so by running sudo apt install gnome-tweaks.
  2. Press the Super key (Windows key) to open the application overview, type Tweaks, and press Enter.
  3. In the left-hand sidebar of GNOME Tweaks, click on Keyboard & Mouse.
  4. In the right-hand panel, locate the setting labelled Middle Click Paste.
  5. Toggle the switch to the On position.

The adjustment takes effect immediately without requiring a system reboot or session logout.

Method 2: Enable via Command Line (GSettings)

If you prefer configuring system preferences using the terminal or deploying settings via shell script:

  1. Open your terminal application by pressing Ctrl + Alt + T.
  2. Execute the following gsettings command to activate middle-click pasting:
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true

To verify that the configuration is active, run:

gsettings get org.gnome.desktop.interface gtk-enable-primary-paste

If the terminal returns true, primary selection pasting is fully enabled.

How to Use Middle-Click on Laptop Touchpads

If your laptop lacks a dedicated physical middle mouse button, modern Ubuntu installations recognise a three-finger tap on your touchpad as a middle click. Simply highlight text in any document or browser window, place your cursor where you wish to paste, and tap lightly with three fingers simultaneously.

Tip: If you accidentally trigger unwanted pastes when scrolling through web documents with a loose mouse wheel, you can toggle the same setting to Off at any time to prevent errant text insertion.

Re-enabling middle-click paste restores standard Linux desktop ergonomics, making text editing and multi-window multitasking significantly faster across Ubuntu.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.