Categories: TutorialsUbuntu

How to share clipboard between Ubuntu VirtualBox and host

If you’re using Ubuntu on a VirtualBox, you might find yourself needing to move some text between your host computer and the virtual machine. Luckily, copying and pasting between them is pretty easy to achieve. In this guide, we’ll go over the steps you need to take to enable clipboard sharing between your Ubuntu VirtualBox guest and your main computer.

Installing the Guest Addition Image for VirtualBox

If you want get that Guest Additional Image up and running in your Virtual Machine, here’s what you need to do:

First off, fire up VirtualBox and pick the machine you want use for clipboard sharing. Then, go ahead and start it up.

Sponsored

Read: How to Change the Resolution of Ubuntu 22.04 VM in VirtualBox

Once your machine is up and running, pop open the operating system’s terminal and enter the command below. This’ll get you the packages you need to install the Guest Addition Image.

How to install guest additions virtualbox

Once you’ve got the necessary packages installed, it’s time to pop in that Guest Addition CD. Just click on “Devices” in the Virtual Machine’s menu bar and choose “Insert Guest Addition CD image” from the dropdown.

Read: How to share folders between your Ubuntu Virtualbox and your host machine

Just sit tight for a bit while the installation wraps up. Once it’s done, you’ll be prompted to reboot your system. So go ahead and shut down the Virtual Machine, then right-click on it to get to the settings icon. Alternatively, you can just click on the machine and hit the settings icon, like in the screenshot below:

Copy paste in Virtual box – Virtualbox shared clipboard

Head over to the machine’s settings window and find the “General” tab in the left-hand sidebar. From there, choose the “Advanced” tab, which should be displayed in a snapshot above for your reference.

You should be able to see a dropdow called “Shared Clipboard”. Click on the dropdown menu and select the option “Bidirectional” to enable clipboard sharing for the machine. Finally, click the OK button.

Simply start the machine to activate the copy-and-paste feature between VirtualBox and the host. However, if it’s not functioning, it may indicate that the guest Addition Image wasn’t successfully inserted, and you’ll have to insert it manually.

Read: How to quickly send a text from Ubuntu to Android using a three-line Bash script

Sponsored

Manually add the Guest Addition CD Image

To begin, execute this command to create a fresh directory named /mnt/cdrom:

sudo mkdir -p /mnt/cdrom

Virtualbox copy paste not working: 

Now, mount the image to directory /mnt/cdrom by executing the command below:

sudo mount /dev/cdrom /mnt/cdrom

Head over to the /mnt/cdrom directory and run the “VBoxLinuxAddition.run” script.

cd /mnt/cdrom

sudo sh ./VBoxLinuxAdditions.run –nox11

VirtualBox guest additions Ubuntu

Now, After the script has completed running, you’ll need to restart the system. Use the command below:

sudo shutdown -r now

Read: How to add guest features to your Virtualbox on Ubuntu 18.04

Conclusion

Copying and pasting between the host and Ubuntu VirtualBox guest can be a convenient and time-saving feature for users. By following the steps outlined in this article, users can enable clipboard sharing and insert the guest additions CD image to ensure smooth functionality. With these tips and tricks, users can make the most out of their VirtualBox experience and seamlessly transfer information between their host and Ubuntu guest operating systems.

 

The post How to share clipboard between Ubuntu VirtualBox and host appeared first on net2.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

5 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago