Virtualbox linux копировать вставить

How To Enable Copy Paste ( Shared Clipboard ) Between VirtualBox Host And Guest OS

After installing a Linux ( Ubuntu or CentOS ) or Windows in Oracle VirtualBox, you should want to enable the copy & paste function between the virtual machine and the host machine. This article will tell you how to do it.

1. Prerequisite.

  1. First, you should start the virtual machine.
  2. Then click Devices —> Insert Guest Additions CD image… menu item to install the VirtualBox Guest Additions software in your virtual machine OS.
  3. If you install Linux on the virtual machine, you may meet an error during the above process, you can read the article How To Resolve VirtualBox Guest Additions: Kernel Headers Not Found For Target Kernel Error to learn how to fix it.
  4. If you install Windows on the virtual machine, you may find there is nothing happened like the above Linux virtual machine.
  5. For Windows guest virtual machine, it will add the VirtualBox Guest Additions in the guest virtual OS CD drive. You can click the CD drive to open it then click the VBoxWindowsAdditions.exe file to install the guest additions.
  6. After installing the guest additions, you need to restart the guest OS to enable it.

2. Enable Copy & Paste ( Share Clipboard ), Drag & Drop Between Oracle VirtualBox Virtual Machine And Host Machine Steps.

  1. Right-click the virtual machine in VirtualBox.
  2. Then click the Settings… menu item in the popup list.
  3. Then click the Advanced tab in the General settings window.
  4. Select the Bidirectional item in the Shared Clipboard drop-down list.
  5. You can also select the Bidirectional item in the Drag’n Drop drop-down list.
  6. You can also click Devices —> Shared Clipboard —> Bidirectional , Devices —> Drag and Drop —> Bidirectional menu item to configure above settings.
  7. If you still can not copy files between the host and guest virtual machine, you can read the article How To Share Folders Between Virtualbox Host And Guest Virtual Machine to share the files between the host and guest virtual machine to copy the files between them.

3. How To Enable Copy/Paste From Mac To Virtual Machine.

3.1 Question(2022/05/17).

  1. My host machine is a Mac machine. And I install a Windows 7 virtual machine in the Virtual box.
  2. I write source code in a macOS editor, and I want to copy the source code from the macOS to the editor in the windows 7 virtual machine.
  3. I have installed the guest editions option and enabled it on the virtual machine.
  4. But I do not know how to configure the virtual machine to enable the copy & paste feature so that I can copy the source code from the source code editor on macOS to the windows 7 virtual machine.
Читайте также:  Alt linux виртуализация фстэк

3.2 Answer1.

  1. You can open the virtual machine’s Settings configuration window.
  2. Then click the General item on the Settings window left side.
  3. Click the Advanced tab on the right side.
  4. Select the Bidirectional item from the Shared Clipboard drop-down list on the Advanced tab.
  5. Then you can copy & paste text, files, and so on between your macOS host and Windows7 guest.

3.3 Answer2.

  1. To copy text or files in macOS, you should press the ⌘ + C.
  2. To paste the clipboard data to VirtualBox windows 7 virtual machine, you should press Ctrl + ↑ + V.
  3. To copy text or files on a windows 7 virtual machine, you should press Ctrl + ↑ + C.
  4. Paste text or files to macOS, you should press the ⌘ + V.

3.4 Answer3.

  1. Open the macOS Finder window and click the Applications item on the Finder window’s left side.
  2. Right-click the Virtualbox.app application on the Finder window right side, then click the Show Contents menu item in the popup menu list.
  3. Then you can find the VBoxGuestAdditions.iso file in the macOS folder and copy this file to another local folder.
  4. Assign the VBoxGuestAdditions.iso file to the Virtual machine’s optical disk and then run it to install the VBox guest additions.
  5. After you install the VBox guest additions, the copy & paste function can work between the macOS host and the guest, but my guest os is Ubuntu.

Источник

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

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:

  • Enable clipboard copy-pastes (text and files or folders)
  • Enable shared folders (or directories) between host and guest [How to enable drag and drop between VBox guest and host]
  • Changing screen resolutions
  • Automated logins, and so on.
  • To know more about the extension pack, please refer: https://www.virtualbox.org/manual/ch04.html
  • For VirtualBox 7 version guide How to install Ubuntu 22.04 VM using the VirtualBox 7 unattended method

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.

Читайте также:  Rog armoury crate linux

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 -> S hared 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 below image for reference.

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.

With these settings enabled, you should be able to 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 not working 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

To enable copy and paste functionality between your host machine and a VirtualBox virtual machine running Ubuntu Linux, you need to install and configure the VirtualBox Guest Additions. 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

The latest

Источник

How do I enable copy and paste between VirtualBox and host?

While working in a VirtualBox and its virtual machines, it is often needed to copy and paste some content between the Virtual machine and the host. In other words, if we use real technical terms, we need to share the clipboard between guest and host. For sharing the clipboard, all you need to do is install the Guest Additional Image in your Virtual Machine and enable the sharing of the clipboard.

Installation of VirtualBox Guest Addition Image

To install guest additional image in your Virtual Machine, follow the procedure given below:

Open up the Virtual box and select the machine in which you want to enable the clipboard sharing feature, and start the machine.

Once the machine is started, open the terminal of the Operating system and execute the command provided below to install some necessary packages for installing Guest Addition Image:

Читайте также:  Linux and playstation 3

For Ubuntu or Debian based operating systems:

For CentOS or RHEL based operating systems:

After installing the required packages as well, insert the Guest Addition CD image by clicking on the “Devices” in the menu bar of the Virtual machine and selecting “Insert Guest Addition CD image” from the “Devices” menu:

The installation will complete in a while.

Once it is completed, it will ask to reboot the system. So, shut down the machine and go to the settings of that machine by right-clicking on the machine and selecting the settings icon or select the machine and click on the settings icon as shown in the screenshot attached below:

In the settings window of the machine, go to the “General” tab from the left sidebar and select the “Advanced” tab as shown in the picture given below:

In the “Advanced” tab, you can see the two dropdowns named “Shared Clipboard” and “Drag’n’Drop.”

Select each dropdown menu and choose the “Bidirectional” option to enable the machine’s clipboard sharing and drag-drop features.

After changing both options, click the “ok” button shown in the bottom right corner of the settings window to save all the settings done.

Now, just start the machine to enable copy and paste between VirtualBox and host.

But if it is not working for you, then it means that the guest Addition Image is not inserted successfully. You have to insert it manually.

Insert Guest Addition CD Image Manually

First, create a new /mnt/cdrom directory:

After creating, mount the image to the /mnt/cdrom:

Change directory to the /mnt/cdrom and execute the “VBoxLinuxAddition.run” script:

Once the script has finished the execution. Reboot the system using the command mentioned below:

After rebooting the machine, retry to copy and paste something between the host and Virtual machine. It will definitely work perfectly fine now.

Enable Shared Clipboard Option

There is another way to enable the shared clipboard option to bidirectional by going to the “Devices” in the menu bar, “shared Clipboard,” and clicking on the “Bidirectional” option as shown in the screenshot provided below:

After enabling it, you can easily copy and paste anything between host and Virtual Machine

Conclusion

This post has covered all the basic to pro-level concepts and methods to install the Guest Addition CD Image to enable the copy and paste between VirtualBox and host. We have learned to share the clipboard between the host and the virtual machine and enable the drag-drop features between them by installing the Guest Addition Image in the virtual machine using the simple method and manually from the terminal.

About the author

Shehroz Azam

A Javascript Developer & Linux enthusiast with 4 years of industrial experience and proven know-how to combine creative and usability viewpoints resulting in world-class web applications. I have experience working with Vue, React & Node.js & currently working on article writing and video creation.

Источник

Оцените статью
Adblock
detector