How to copy and paste in the command line Interface of Ubuntu Minimal?

Use Control+Shift+C to copy, and use Control+Shift+V to paste.

References

  1. http://howtoubuntu.org/how-to-cut-copy-and-paste-in-the-terminal-in-ubuntu

  2. https://stackoverflow.com/questions/761807/copy-and-paste-from-terminal-with-keyboard-in-linux-ubuntu


VMware Workstation 12.5.2 supports general paste (UPDATE)

By accident I noticed that the current version of Workstation (12.5.2) supports general paste. I mean paste anywhere including the Linux text console without need to have any VM tools installed. A similar function was available in Microsoft Virtual PC.

The function works by emulating key presses. This implies the following limitations:

  • The keyboard layout of the VM must match the keyboard layout that VMware Workstation expects. Otherwise the characters on keys which differ will be entered wrongly.
  • The expected keyboard layout in my case was "United States" though I use a different layout both in my host and guest machine.
  • There does not seem to be a (simple) way how to change the expected keyboard layout.
  • Only paste works this way. Copy works only the old way with the support of VMware tools.

I know about two ways how to invoke the function:

  1. Have the VM window selected but the keyboard not grabbed (Ungrab using Ctrl+Alt or select the VM window by clicking the VM tab.) then press Ctrl+V.
  2. Have the VM window selected and use the function from the menu: Edit > Paste

There are additional limitations:

  • There does not seem to be a shortcut using the VMware hot key Ctrl+Alt which would allow using the function while the keyboard is grabbed.
  • The function does not seem to be accessible from VMware 12 Player (version 12.5.2). Ctrl+V does not work and there is no Paste function in the menu.
  • The function is described neither in the documentation nor in the release notes.

The other and older products do not support paste outside of X Window System or without VM tools

This is a limitation of VMware products. Unfortunately most of them do not support copying and pasting in a text console of an operating system. The clipboard integration works only in the graphical user interface with working VMware Tools or open-vm-tools installed.

SSH as an alternative solution

When I work with Linux virtual machines without GUI (almost all my Linux virtual machines) I use SSH access as Eugen Rieck suggested already. As he wrote this solution allows also other very useful features. I would certainly name longer and more easily usable scrollback buffer (without need to use terminal managers like screen).