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?

  • 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. Commented Oct 10, 2013 at 21:29
  • I use Putty to ssh the Hyper-V machine command prompt. Copy Paste works both ways easily.
    – Isodata-JP
    Commented Sep 8, 2014 at 12:11

2 Answers 2


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).

  • 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?
    – novicegis
    Commented Oct 10, 2013 at 14:07
  • No, this doesn't work that easy. :) See updated answer.
    – peterph
    Commented Oct 10, 2013 at 14:29
  • Thanks for everyone. For a while I use WinSCP for copy file (with text) between this OS. I do not know how long we will work with Ubuntu...
    – novicegis
    Commented Oct 11, 2013 at 6:59

It depends on how you are accessing the guest from the host. Is it the console of the guest through a HyperV connection manager? HyperV has a feature in the Connection Manager to "Type Clipboard Text".

Does the guest run X? There appears to be no native copy/paste functionality between HyperV and X, so you may want to run a remote session using something like VNC or perhaps NX. And aside from the Type Clipboard Text, it looks like you cannot copy on the guest or read from its clipboard.

  • Type clipboard text doesn't work with most Linux distros in X11
    – Warren P
    Commented Oct 13, 2016 at 22:40

You must log in to answer this question.

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