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

Building RAG with enterprise open source AI infrastructure

One of the most critical gaps in traditional Large Language Models (LLMs) is that they…

11 hours ago

Life at Canonical: Victoria Antipova’s perspective as a new joiner in Product Marketing

Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…

1 day ago

What is patching automation?

What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…

2 days ago

A beginner’s tutorial for your first Machine Learning project using Charmed Kubeflow

Wouldn’t it be wonderful to wake up one day with a desire to explore AI…

3 days ago

Ubuntu brings comprehensive support to Azure Cobalt 100 VMs

Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…

3 days ago

Ubuntu Weekly Newsletter Issue 870

Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…

4 days ago