Do you know how I can copy text in tmux mode in CentOS 7? enter image description here

When I select the text, it shows as yellow but cannot copy it.

This is what I have in tmux.conf: enter image description here

If I press shift while selecting, it will show as white but then I cannot right-click to copy neither CTL+C or CTL+SHIFT+C would work for copy.

enter image description here

1 Answer 1


I use Ubuntu, and I have xclip (so for you, yum install xclip) installed on my system and have the following in my .tmux.conf which allows me to begin copying (having pressed Ctrl + b then [) by pressing v and to paste the copied stuff to the system clipboard with y:

bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'

Note that this is for vi mode, but I assume if you change it to:

bind-key -T copy-mode-emacs v send-keys -X begin-selection
bind-key -T copy-mode-emacs y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'

it will work the same way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.