1. Install xclip $ sudo apt-get install xclip 2. Configure Tmux Open up your Tmux configuration (typically at ~/.tmux.conf) and append: tmux version >= 1.8 bind -t vi-copy y copy-pipe "xclip -sel clip -i" Now when you copy some text, it will automatically be copied to OS clipboard. tmux version < 1.8 # copy & paste between tmux and x clipboard bind C-p run-shell "tmux set-buffer \"$(xclip -o)\"; t
![How to Copy and Paste with Tmux on Ubuntu (Example)](https://cdn-ak-scissors.b.st-hatena.com/image/square/ae58546339a31c87ad2ba4343b1c06e672105d22/height=288;version=1;width=512/https%3A%2F%2Fcoderwall-assets-0.s3.amazonaws.com%2Fuploads%2Fuser%2Favatar%2F23944%2Fd83b63db79b42978fe35e120550ca180.png)