How do I copy text from my xterm without a mouse?
You can use GNU screen's copy and paste commands.
Quick tutorial:
- Open screen:
screen
(orscreen myprog my args here
) - Run your program, producing output you want copied
- Enter copy mode: Control+a+[
- Move your cursor to the start point
- Hit Enter
- Move your cursor to the end point
- Hit Enter
- Paste: Control+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 Ctrl+a, Ctrl+\.
Copy Paste Command in Text Based Linux Server (No GUI)
Note: This question is about a terminal, not a terminal emulator. A terminal is what you see when you connect a computer without a graphical desktop to a monitor and keyboard (no mouse supported at that point)
On a text based terminal (not a terminal emulator(!)) copy/paste is not possible.
If possible, I recommend to use ssh
and connect with a terminal emulator which does support copy/paste to that box. For example gnome-terminal could be used for that: https://help.gnome.org/users/gnome-terminal/stable/txt-copy-paste.html
xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection
You might find Bug588785 interesting to read. A quick workaround would be to install and use xclipboard as seen in Comment 145.
Copy text from Vim 7.2 running in xterm to windows clipboard
Try
"+3yy
"*3yy
"+p
"*p
Related Topics
How to Understand "Cmpl $0X0, -0X30(%Rbp)"/"Je ..."
How to Include File in a Bash Shell Script
How to Install Crontab on Centos
Keep Remote Directory Up-To-Date
How to Count Number of Unique Values of a Field in a Tab-Delimited Text File
Unix Command to List Files Containing String But *Not* Containing Another String
How to Clear the Scrollback in the Screen Command
Jmeter - Loopback Address Error When Launching Jmeter-Server on Linux
Git Merge Branch of Another Remote
Why Is Cpu-Cycles Much Less Than CPU Current Frequency
Fast Way to Get Image Dimensions (Not Filesize)
JSON Command Line Formatter Tool for Linux
How to Install Chkconfig on Ubuntu
Difference Between Vm.Dirty_Ratio and Vm.Dirty_Background_Ratio
Run a Shell Script in New Terminal from Current Terminal