Does non-X Linux have a clipboard

clipboard

I know that Linux Desktops with a windowing manager such as X11-based systems have a system clipboard, but if not using a windowing manager, is there any clipboard?

For example, in Vim, the system clipboard can be accessed via the + register, but this only works in the GUI version of Vim running on X-windows since it is using the window manager's clipboard. If you are using text-based version of Vim, such as from a terminal or from a virtual console, it does not work. For example, if you open two different instances of Vim in different virtual consoles, how would you copy and paste between them?

Best Answer

screen and tmux support copy-paste buffers, so that’s one possible approach (see the other answer for details).

Using only Linux virtual consoles, you can run gpm (or its libinput replacement, consolation) to provide mouse-based copy-paste: select text with the left mouse button, paste it with the middle mouse button.

Neither of these have direct integration with Vim as far as I’m aware, so you’re limited to copying what’s visible on screen or in the scrollback buffers if anything.

Related Question