Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to select and copy text anywhere in terminal(xterm) window(that is, not only current shell line, but also output from previous commands) using only keyboard?

share|improve this question

2 Answers 2

tmux and screen (shell multiplexers) both have a copy-mode, which you can enter via keyboard, move around the cursor via keys .. and select text via the cursor. naturally, you can scroll back in the output buffer.

i don't know a pure xterm-solution, maybe something like gnome-terminal etc will do it (allthough i doubt it, they are even more fancy than xterm :))

share|improve this answer
    
I know and use tmux, though here I'm looking for terminal only solution. I would fall back to multiplexers only if there is no solution. –  morphles Apr 19 '12 at 7:39

XTerm version from end of 2013 cannot do that, unfortunately.

You can use tmux or screen to copy text, as akira reponded.

Also you can copy output of the last command to X selection easily with:

!! | xsel -bi

More here: http://stackoverflow.com/questions/312213/how-do-i-copy-text-from-my-xterm-without-a-mouse

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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