How to enable copy and paste in a VirtualBox running Ubuntu Linux

Problem: VirtualBox Ubuntu copy pastes not active

Description: VirtualBox text copy pastes is not working Ubuntu 22.04 (VBox on Windows 11 host)

How does it work?

VirtualBox guest additions are software tools installed in the guest VM after installing the OS. They consist of device drivers and system applications that improve the guest VM performance and usability. There are more things you can achieve by installing the VBox guest additions pack, such as:

Let us see how to enable the copy-paste.

Step #1: Make sure VirtualBox Guest Addition is installed in the Guest VM

You must install VirtualBox Guest Addition in the Ubuntu Guest OS to enable the copy-pastes. If you are looking for a guide to installing VirtualBox Guest Addition installation, Please refer to one of these guides depending on your Ubuntu version:

After installing the extension pack, continue with the next step.

Step #2: Enabling Shared Clipboard Copy and Pastes.

From the VirtualBox management window, follow these steps to enable Clipboard (or text) to Copy and Paste between Virtualbox hosts and guest(s).

  • Open the VirtualBox Manager window in Windows 11.
  • Right-click on the Ubuntu VM where you want to enable copy and paste, then click on Settings.
  • General settings -> Go to the Advanced TAB on the right side of the Settings window. (shown in the picture below)
  • Click the Advanced Settings tab -> Shared Clipboard, and select Bidirectional (Bidirectionally).
  • If you prefer to enable copy-paste in one direction, please choose that appropriately.
  • After your selection, click on the OK button to save your preferences.
  • Please refer to the image below.

Sometimes, depending on the VirtualBox software versions, you may need to restart the guest OS (in our case, the Ubuntu VM) to put this change into effect.

VirtualBox Ubuntu enable bi-directional Clipboard

With these settings enabled, you can copy and paste text and files between your host machine and the Ubuntu virtual machine in VirtualBox.

FAQ: This solution solves the below queries.

  • VirtualBox text copy-pastes are not working in Ubuntu 22.04.
  • Bidirectional text copy/paste Virtual-box is not working in Ubuntu.
  • Enable bi-directional copy-paste between Virtual Box Ubuntu VM and Windows 11 host (on Windows 10 host).
  • How to copy text from VirtualBox Windows hosts to Ubuntu virtual machines?

This experiment is tried and tested on the following VirtualBox Ubuntu version combinations:

  • Ubuntu 22.04, VirtualBox 6.1.34
  • Ubuntu 20.04, VirtualBox 6.01
  • VBox Hosts: Windows 10 and Windows 11.

Conclusion

You must install and configure the VirtualBox Guest Additions to enable copy-and-paste functionality between your host machine and a VirtualBox virtual machine running Ubuntu Linux. The Guest Additions package provides additional features and drivers that enhance the integration between the host and guest systems, including clipboard sharing.

In this guide, we have gone through the steps to enable Clipboard Copy-Pastes between VirtualBox host and guest. If you are looking for the steps to allow drag and drop, please refer to this guide: How to enable drag and drop in a VirtualBox

Related: How to install Ubuntu 22.04 VM using the VirtualBox 7 unattended method