I am having a problem pasting code from a html file on my host machine into a file written in nano editor on my VM which has Ubuntu Server 16.04

I have enabled shared clipboard between host machine and virtual machine, but it won't do the copy and paste.

Shared Clipboard is enabled

And I know commands for select, copy and paste text in nano using Ctrl + Shift + 6 to enable selecting multiple lines Ctrl + K for cutting the text Ctrl + U for pasting the text But this is for manipulating text within the same document, what I need is to copy text from Host machine, and then paste it into file on my Virtual machine.

If it's more convienient to use a different editor please let me know.

  • Did you install the Virtual Box Extensions into your VM ? Otherwise that copy&pasting does not work.
    – Videonauth
    Dec 2, 2016 at 10:56
  • Videonauth - I haven't installed those VIrtual Box Extensions, do you have a download link, so I can install them?
    – VukDju
    Dec 2, 2016 at 10:59
  • It can be installed from one of the panel menus of the virtual machine. Let me check which one real quick Dec 2, 2016 at 11:02
  • Ok, writing an answer for you.
    – Videonauth
    Dec 2, 2016 at 11:02
  • That's Devices drop down menu, and it's the very last item. But wait for Videonauth's answer, he'll explain it in more detail Dec 2, 2016 at 11:05

1 Answer 1


Open a terminal (ctrlaltt) and download the extensions as following:

cd ~/Downloads
wget http://download.virtualbox.org/virtualbox/5.1.8/Oracle_VM_VirtualBox_Extension_Pack-5.1.8-111374.vbox-extpack

And then you Fire up your VirtualBox, and when its just opened move to File --> Preferences see following screen-shot:

enter image description here

In the now opened preferences window navigate to Extensions (Step 1) and click on the button with the small triangle (Step 2)

enter image description here

Navigate into your home directory in the next dialog window and select the extensions you just downloaded. Now you will guided through the installation process. To accept the EULA you need to fully scroll it down.

Now its time to start your server VM and start it and within the VM window you select devices and choose the bottom most option.

After done it should have auto-mounted the disk to your VM. Navigate to it with your terminal. It should be in /media/$USER/ or in /media/.

When in the extensions folder type:

sudo apt update
sudo apt dist-upgrade
sudo apt install linux-headers-generic build-essential
sudo sh ./VBoxLinuxAdditions.run

Now restart your VM with:

sudo reboot

After that you should be able to copy&paste I think, have not used VirtualBox in ages, but in worst case refer to the installation manual of virtual box which you can find on their Website.

  • I am trying this out. Thank you very much for helping me, I will let you now if this solved my problem :)
    – VukDju
    Dec 2, 2016 at 11:59
  • Although it will be interesting to see whether and/or how the 5.1.10 extension pack will work within vbox 5.1.8 ... good answer - so +1 ! :) In case you have chosen the version accidentally, you may want to consider changing it. :)
    – cl-netbox
    Dec 2, 2016 at 13:46
  • There are only 5.0.28 and earlier version or this one fro all actual 5.1 versions, checked their download site while writing this.
    – Videonauth
    Dec 2, 2016 at 14:30
  • 2
    @Videonauth : And what do we see here -> download.virtualbox.org/virtualbox/5.1.8/… ? :D
    – cl-netbox
    Dec 2, 2016 at 16:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .