Android - How to use tmux copy / paste in Termux?

Try having this line in your ~/.tmux.conf file:

set-window-option -g mode-keys vi

This enables a set of vi key bindings that seems to work fine. I used the Spacebar and Enter keys to copy that line from within a tmux session running in Termux and pasted it into this textbox in Chrome with Ctrl+v.


Unfortunately, tmux can't access Android system clipboard, unlike real GNU/Linux distros. The copy mode is pretty much isolated in tmux, so you can only copy from and paste to within sessions.

To paste from clipboard, long-press (hold) anywhere on the terminal screen and tap "Paste" in the pop-up menu.

To copy to clipboard, long-press some text on the terminal screen. Drag the pins to select the text you want to copy and tap "Copy" in the pop-up menu.


This answer may be irrelevant to your needs, but I arrived at your post while trying to solve a problem. Unlike with the x windows system, you don't need anything but Termux to paste text. Use "share" on the selected text, share to Termux, then enter a filename as prompted, and tap open folder.

Tags:

Termux