How to copy text from Host machine and paste it into nano editor in Ubuntu Server Virtual Machine

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.

9

1 Answer

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

cd ~/Downloads
wget 

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.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like