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.
- First, you should start the virtual machine.
- Then click Devices —> Insert Guest Additions CD image… menu item to install the VirtualBox Guest Additions software in your virtual machine OS.
- 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.
- If you install Windows on the virtual machine, you may find there is nothing happened like the above Linux virtual machine.
- 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.
- 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.
- Right-click the virtual machine in VirtualBox.
- Then click the Settings… menu item in the popup list.
- Then click the Advanced tab in the General settings window.
- Select the Bidirectional item in the Shared Clipboard drop-down list.
- You can also select the Bidirectional item in the Drag’n Drop drop-down list.
- You can also click Devices —> Shared Clipboard —> Bidirectional , Devices —> Drag and Drop —> Bidirectional menu item to configure above settings.
- 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).
- My host machine is a Mac machine. And I install a Windows 7 virtual machine in the Virtual box.
- 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.
- I have installed the guest editions option and enabled it on the virtual machine.
- 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.
3.2 Answer1.
- You can open the virtual machine’s Settings configuration window.
- Then click the General item on the Settings window left side.
- Click the Advanced tab on the right side.
- Select the Bidirectional item from the Shared Clipboard drop-down list on the Advanced tab.
- Then you can copy & paste text, files, and so on between your macOS host and Windows7 guest.
3.3 Answer2.
- To copy text or files in macOS, you should press the ⌘ + C.
- To paste the clipboard data to VirtualBox windows 7 virtual machine, you should press Ctrl + ↑ + V.
- To copy text or files on a windows 7 virtual machine, you should press Ctrl + ↑ + C.
- Paste text or files to macOS, you should press the ⌘ + V.
3.4 Answer3.
- Open the macOS Finder window and click the Applications item on the Finder window’s left side.
- Right-click the Virtualbox.app application on the Finder window right side, then click the Show Contents menu item in the popup menu list.
- Then you can find the VBoxGuestAdditions.iso file in the macOS folder and copy this file to another local folder.
- Assign the VBoxGuestAdditions.iso file to the Virtual machine’s optical disk and then run it to install the VBox guest additions.
- 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.
Thank you so much for the article