I am running VirtualBox 4.1.4 on my Windows 7 laptop, running an Ubuntu 11.10 guest.

I would like to copy text from Ubuntu's terminal and paste it into a file on the Windows host. This doesn't work for some reason.

Any ideas?

10 Answers 10

up vote 56 down vote accepted

Start your VM then install Virtualbox Guest Addition
You can find this option under "Devices" on virtual box 4.2 or you can follow the explanations at How do I install Guest Additions in a VirtualBox VM?

  • 4
    We have a how to for installing guest additions here on AU – Takkat Oct 28 '11 at 7:08
  • This CD image is not available anymore. – 71GA Sep 16 '12 at 18:55
  • 21
    also you need to enable the shared clipboard under Devices menu on the VM's toolbar. Devices > Shared Clipboard > [Host To Guest | Guest To Host | Bidirectional] – 10GritSandpaper Dec 16 '13 at 16:51
  • Do the same for Drag'n'Drop too – arun Dec 30 '17 at 2:14

Go to VirtualMachine's Settings->General->Advanced->Shared Clipboard (Bidirectional)

Reboot your virtual machine.

for me it solved the problem (it was set on Disabled), I had some machines working some not, so i checked settings in working ones they had bidirectional clipboard. Dont know if this was upgrade issue or... just double check your shared clipboard options.

Hope this helps someone.

VirtualBox V 4.1.20

  • 7
    how can i paste the text from window to ubuntu server? Ctrl + Shift + V does not help – Thai Tran Apr 28 '14 at 10:25
  • @ThaiTran I don't know of a way to do this directly. A decent workaround is to ssh into your server from a terminal emulator, and then just paste into the emulator. – Jack O'Connor Nov 14 '14 at 20:05
  • Worked without rebooting the virtual machine (virtualbox 5.0.14). – overthink Jan 26 '16 at 20:06
  • Using Virtual Box 5.0.18 and Ubuntu 14.04, the reboot is not required. The essential step is turning on the shared clipboard. – Mike Apr 29 '16 at 16:51
  • Do the same for Drag'n'Drop too – arun Dec 30 '17 at 2:14

I had to do three steps:

  1. Install Virtual Box extension pack in host
  2. Activate shared clipboard in menu
  3. Install Virtual Box guest extensions in ubuntu guest
    • sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
  • That's what worked for me from ubuntu host to ubuntu guest, thanks ! – valkalon Oct 23 '16 at 10:42
  • step 3 was missing and worked for me – user674523 Apr 7 '17 at 9:01
  • Step #3 lead to boot jam on Ubuntu 17.10, where was previously installed guest additions via sudo apt-get install virtualbox-guest-additions-iso – Dee Dec 2 '17 at 19:26

Did you install the required virtual box tools?? (the ones that you should install on guest operating system to gain smooth operation / interaction between the host and the guest)

  • Probably not. What tools should I install, and how? – Misha Moroshko Oct 28 '11 at 4:04
  • It is called "Guest additions" as @soekarmana answered. – Beniamin Oct 28 '11 at 8:04

You could use Pastebin.com if you have access to the Internet.

  • 3
    Or, alternatively, pastebin.ubuntu.com. – Christopher Kyle Horton Oct 28 '11 at 4:33
  • A guest user cannot delete a paste? Just pasted some sensitive stuff and found out a second later it can't be deleted. Really frustrated! – Logan Yang Jan 3 at 23:04

In VirtualBox 4.x:

Start the Ubuntu instance, then in the VirtualBox menu at the top of the running instance window, Machine > Settings..., Advanced tab, change Clipboard Sharing to Bidirectional. It's set to Disabled by default for some reason - not clear on why I'd ever want that.

The summary of "Main OS and Virtual OS Integration":

  1. Install Vbox Guest Additions
  2. Enable Shared Clipboard
  3. Enable Drag'n'Drop
  4. Enable Shared Folder (optional)

I marked some text from firefox and tried to paste it into a terminal and it didn't work. I had guest additions installed, and also enabled bidirectional copy and paste and it still didn't work, but now I found the reason.

Apparently when I marked the text in firefox, additional information is also stored like the font and style. The terminal can not interpret this, so it doesn't seem to accept it. I pasted the text into a plain text editor (notepad++ in my case) then selected the text again and copied it. Now when I pasted it into the terminal it worked.

So this can also be a reason why copy&paste doesn't work, even if everything is correctly setup.

Using VirtualBox 4.3.12 with Ubuntu 14.04 x64 as the guest.

this worked http://www.helpfulbox.com/ans/Humanities_Races/758885

  • 4
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – fossfreedom May 3 '12 at 22:21

in recent virtual box follow these instructions :

enter image description here

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.