5

How do I copy and paste from a VirtualBox VM, running Debian, with no Desktop Environment?

Matthew G.
  • 226
  • 1
  • 14
BlaShadow
  • 625
  • 1
  • 6
  • 9

3 Answers3

4

From my brief research it appears that you can't copy & paste between a Linux guest that has no graphical interface. (ie no X server, so you're in the virtual console) This is the most relevant source I could find: Paste into Linux Console?. (Specifically, see Sasquatch's post near the bottom) I think this is because the virtual console has no clipboard functionality, which is generally managed by GUI's. If you were running, say GNOME on your Debian guest, then it would only be a matter of installing the Guest Addition through Virtualbox as others have pointed out.

Apparently, it's also possible to create an SSH connection between your host and the guest OS. You may want to try that instead depending on your needs. Here's a tutorial: Setup SSH access between VirtualBox Host and Guest VMs.

Robert Gomez
  • 1,434
  • 12
  • 10
  • so the answer is I can't? – BlaShadow Oct 23 '13 at 01:46
  • I believe so, not directly from your host to your Debian guest. What is your guest OS anyways? What are you trying to do? Have you tried the SSH method I suggested? I think if you connect to your guest that way, then you may be able to copy and paste through your terminal. Here's a video demonstrating the setup: [SSH into your Virtualbox VM from the same computer](http://www.youtube.com/watch?v=5BsShkcweIs) – Robert Gomez Oct 23 '13 at 03:07
  • I just want to use all the features of a linux terminal on win7 :) over a debian distro. – BlaShadow Oct 23 '13 at 03:39
  • That really sucks.. I mean the guest tools could simply "type" out the clipboard into the damn console.. common we on 2017! That is what putty does.. We also connec to to the CONSOLE! So how come putty manages to paste into a console.. face palm.. so annoying! Thanks for the answer :D – Piotr Kula Sep 27 '17 at 08:26
1

You should be able to install the Guest Additions and away you go

Jason McD
  • 1,062
  • 1
  • 10
  • 14
1

Roberto Gomez' answer is correct, and I am not questioning it. But I would like to add that, should you enable an X server on your system, you can do better than that: in the VirtualBox GUI, after highlighting your VM, go to Settings -> General -> Advanced, and you can set both Share Clipboard and Drag 'n' Drop to the value "Bi-directional", which I find especially convenient.

MariusMatutiae
  • 46,990
  • 12
  • 80
  • 129