How to share clipboard between ubuntu virtualbox and host

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

How to share clipboard between ubuntu virtualbox and host 1

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 share clipboard between ubuntu virtualbox and host 2

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.

How to share clipboard between ubuntu virtualbox and host 3

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:

How to share clipboard between ubuntu virtualbox and host 4

How to share clipboard between ubuntu virtualbox and host 5

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.

See also  How to Install WPS Office on Ubuntu 22.04

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

Manually add the Guest Addition CD Image

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

Sponsored

sudo mkdir -p /mnt/cdrom

How to share clipboard between ubuntu virtualbox and host 6

Virtualbox copy paste not working: 

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

sudo mount /dev/cdrom /mnt/cdrom

How to share clipboard between ubuntu virtualbox and host 7

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

cd /mnt/cdrom

How to share clipboard between ubuntu virtualbox and host 8

sudo sh ./VBoxLinuxAdditions.run –nox11

How to share clipboard between ubuntu virtualbox and host 9

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.


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply