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.

How to select text in BASH terminal using the keyboard without mouse?

I'm using Ubuntu 10.10

share|improve this question
1  
If it's possible it probably depends on your terminal (xterm, rxvt, something else). So what do you use? –  Nifle Jan 2 '11 at 16:08
    
see also stackoverflow.com/q/312213/1172302 –  Nikos Alexandris Jul 5 '13 at 8:12

1 Answer 1

Perhaps this works (source)

You can use GNU screen's copy and paste commands.

Quick tutorial:

  1. Open screen: screen (or screen myprog my args here)
  2. Run your program, producing output you want copied
  3. Enter copy mode: ^A [
  4. Move your cursor to the start point
  5. Hit enter
  6. Move your cursor to the end point
  7. Hit enter
  8. Paste: ^A ]

Screen is much more powerful than that (I use it to tab several virtual terminals without the need for a special terminal emulator, and also so that I don't loose my sessions when X crashes or something). To get out of screen, simply end your shell session, or type ^A ^.

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.