How to Enable Copy and Paste in VirtualBox on Linux

If you've ever tried to copy a command from your host machine and paste it into a VirtualBox Linux guest — only to watch nothing happen — you're not alone. VirtualBox doesn't enable clipboard sharing by default. The good news is that it's a straightforward fix once you understand what's actually required.

Why Copy and Paste Doesn't Work Out of the Box

VirtualBox treats your guest operating system as an isolated environment. By default, the virtual machine has no access to your host system's clipboard. This is actually a deliberate design choice — it keeps the guest environment contained.

To bridge that gap, two things need to happen:

  1. VirtualBox Guest Additions must be installed inside the Linux guest.
  2. Shared Clipboard must be enabled in the VM's settings.

Both pieces are required. Enabling the setting without Guest Additions won't work, and Guest Additions alone won't activate clipboard sharing either.

Step 1: Install VirtualBox Guest Additions

Guest Additions is a package of drivers and utilities that VirtualBox provides to improve integration between host and guest. It enables features like shared clipboard, drag-and-drop, better display resolution, and mouse pointer integration.

Installing via the VirtualBox Menu (Recommended)

  1. Start your Linux virtual machine and log in.
  2. In the VirtualBox menu bar, click Devices → Insert Guest Additions CD Image…
  3. This mounts a virtual CD inside the guest. Open a terminal and navigate to the mount point — typically /media/cdrom or /media/[username]/VBox_GAs_[version].
  4. Run the installer: