Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Windows 7 and use VirtualBox. I have installed Ubuntu Server as a Guest.

Is there any easy way where I can copy text in the Ubuntu Server terminal to my Windows 7 host? And also doing the same in the other direction?

share|improve this question
1  
Do you have Guest Additions installed? If so, it should Just Work. –  Dennis Williamson Oct 25 '10 at 20:30
1  
It's on the ISO that contains Virtualbox. When you select install Guest Additions in the VB menu that mounts an image in your guest as a CD/DVD. From Ubuntu, navigate to that directory (/media/something probably) and run the appropriate shell script (you should be able to tell which one based on their names). –  Dennis Williamson Oct 25 '10 at 20:38
1  
@Dennis: But when I look in the CD-Rom menu in VirtualBox the VBoxGuestAdditions.iso is checked. –  Jonas Oct 25 '10 at 20:45
1  
Since you're running Server, it may not automount. Try mounting the CD from within Ubuntu. –  Dennis Williamson Oct 25 '10 at 21:04
1  
@Dennis: I now followed the instructions on Installing Guest Additions in VirtualBox for an Ubuntu Server Guest. However, as stated in the end of that article. It won't give me support for copy-and-paste unless I install X.Org or XFree86 Window System. –  Jonas Oct 25 '10 at 22:01

5 Answers 5

up vote 8 down vote accepted

I think the best solution is to "ssh" into the server and work on it like that.

The best known SSH client & terminal emulator on Windows is probably PuTTY. When you use that, it will allow you to copy/paste text from/to it.

share|improve this answer
    
This seems to be the way to go. I now followed the instructions on Installing Guest Additions in VirtualBox for an Ubuntu Server Guest. However, as stated in the end of that article. It won't give me support for copy-and-paste unless I install X.Org or XFree86 Window System. –  Jonas Oct 25 '10 at 22:02

I believe you need to install the Virtualbox Guest Additions. This adds certain integration features like the ability to share the clipboard between the host and guest.

After installing guest additions you see the options for clipboard settings such as "Host to Guest", "Guest to Host", as well as "Bidirectional" clipboard sharing. The last is my preference.

share|improve this answer
    
How do I install the Guest Addition? I have tried from the menu, but nothing happens. –  Jonas Oct 25 '10 at 20:32
    
There is no "clipboard" in an Ubuntu Server though (it doesn't have a GUI, at least not in a default install). –  JanC Oct 25 '10 at 21:26
1  
@JanC Didn't see the "server" part at first glance. In this case, SSH into the server is a good solution. If he has any sort of GUI environment, even just X, guest additions should work however. –  John T Oct 25 '10 at 21:59

In the Oracle Virtualbox settings, go to Settings > General > Advanced

There is an option for Drag and Drop. Select the direction you want to copy the text.

share|improve this answer

I had to run manually the following command after the installation of VirtualBox Guest Additions to make copy & paste work.

sudo VBoxClient --clipboard

share|improve this answer
    
I had the same problem, and I find that I have to run the above command before every time I want to copy/paste (i.e., one copy operation on the host is all the command gives you). –  Edan Maor Apr 6 '11 at 17:49

Yes. Highlight the text and right-click. Choose "Copy". Go to the other application and right-click, then choose "Paste". At least that works with my own Ubuntu host and Windows XP guest, in either direction.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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