Copy-paste between Hyper-V guest and host

47,132

You can use ncat - which also has a windows port - to transfer data over network. On one system you run it in "listen" mode, where it binds to some port, on the other system you connect to that port on the other machine. This creates a bi-directional pipe. On Linux you can choose from more variants (GNU netcat, BSD netcat, socat...). Apart from the obvious man page, you can also have a look at the wikipedia netcat article.

Note: on both systems you run these in the terminal (Windows command line, Unix shell) - the copy-paste has to happen twice: on one machine you copy from the source and paste it into the terminal which is running ncat. The data is transferred to the other machine, where you copy it from the terminal to its final destination.

Other option is to exchange files over a Windows share (Samba on Linux).

Share:
47,132

Related videos on Youtube

novicegis
Author by

novicegis

Updated on September 18, 2022

Comments

  • novicegis
    novicegis about 1 year

    My computer runs Windows Server 2008 R2. It hosts a Hyper-V virtual machine running Ubuntu 12.04 as the guest OS.

    I want to copy text from Ubuntu and paste this text in Windows (and copy text in Windows and paste it in Ubuntu). How can I do this?

    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' about 10 years
      VirtualBox and VMware come with “guest tools”: programs that you install in the guest to get niceties such as shared directories and copy-paste. Does Hyper-V come with guest tools? If so, install them.
    • Isodata-JP
      Isodata-JP about 9 years
      I use Putty to ssh the Hyper-V machine command prompt. Copy Paste works both ways easily.
  • novicegis
    novicegis about 10 years
    Thanks. So I can do "ctrl + c" in Windows Server and then "ctrl + v" in Ubuntu and I copy text. Do I copy text this way after ncat tuning?
  • peterph
    peterph about 10 years
    No, this doesn't work that easy. :) See updated answer.
  • Warren  P
    Warren P about 7 years
    Type clipboard text doesn't work with most Linux distros in X11