I recently installed an alpine-3.17 VM using virtualbox 7. I also installed the guest additions and are able to map shared folders. But it seems that I cannot copy-and-paste from the host OS.

I copied some commands in the host OS (Ubuntu 22.04) and then tried to use Ctrl-Shift-V to paste it into alpine terminal (the minimal image without GUI). But nothing is pasted. I also tried a few other key combinations and tried to solve the problem by installing and running bash. But still, it's not accepting paste.

How to enable copy & paste for the alpine Linux command line?

(I can install a GUI if that's necessary).

1 Answer 1


For true copy/paste you will need a GUI, and specifically a GUI that has the VirtualBox Guest Additions "clipboard sync" process installed and running. Any kind of X11-based environment should work for that purpose.

Once you have X11 you'll have a clipboard that VirtualBox Guest Additions could sync with the host's, and the graphical terminal emulators will have shortcuts to paste from it.

The built-in kernel console has no concept of a clipboard, so you cannot copy or paste in it. Bash implements an internal one for use at the command line, but it doesn't extend beyond that single Bash process.

(Though, there are programs such as consolation or gpm that add mouse and copy/paste support to the console – but they don't have an equivalent to the X11 clipboard sync tool that comes with Guest Additions, so they won't know what you've copied on the host

So the only way to "paste" something from the host to the guest's console is to have the VM host send the text as emulated keyboard input. (I believe VirtualBox has such an option in the menus.)

It is in theory possible to have a custom Bash hotkey to get the host clipboard via the same VirtualBox "guest additions" channel and to insert it at the command line, even at the console, but I don't think such a tool has been written yet.

You must log in to answer this question.

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