Copying Text From A Terminal - ArchWiki
Maybe your like
Most mature terminal emulators permit users to copy or save their contents.
General approach
In graphical terminal emulators, contents are typically selectable by mouse, and can then be copied using the context menu, Edit menu or a key combination such as Ctrl+Shift+c.
Terminals without CLIPBOARD selection
Xorg
Some emulators do not support the CLIPBOARD selection natively, and copy data to the PRIMARY selection. For them xclip may be used:
$ xclip -o | xclip -selection clipboard -iThe above command reads data from the PRIMARY selection and writes it to CLIPBOARD selection.
Other clipboard managers such as autocutselAUR provide automatic synchronization between selection buffers.
Wayland
Utilities like wl-clipboard and clipboardAUR can copy data to the Wayland clipboard:
$ command 2>&1 | wl-copyIntercepting commands output
Use tee to intercept the output of a command.
$ command 2>&1 | tee output-fileAfter the command is executed, output-file will contain its output, while having displayed the output at the same time.
Accessing Linux terminal backlog
The backlog of a native terminal named /dev/ttyN may be accessed via /dev/vcsN. Hence, if one is working in /dev/tty1, the following snippet will let store the backlog in a file output-file:
# cat /dev/vcs1 > output-fileComparison of common emulators
The factual accuracy of this article or section is disputed.
Unless the "Key combination" column states otherwise, the key combination is Ctrl+Shift+c.
| Emulator | Select to PRIMARY | CLIPBOARD | ||||
|---|---|---|---|---|---|---|
| Key combination | Context menu | Window menu | Select | |||
| Alacritty | Yes | Yes | No | No | No | |
| atermAUR | Yes | No | No | No | No | |
| etermAUR | Yes | No | No | No | No | |
| foot | Yes | Yes | No | No | Optional | |
| germinalAUR | Yes | Yes | Yes | No | No | |
| Guake | Yes | Yes | Yes | No | No | |
| Konsole | Yes | Yes | Yes | Yes | Optional | |
| lilyterm-gitAUR | Yes | Yes Ctrl+Delete | Yes | No | No | |
| lxterminal | Yes | Yes | Yes | Yes | No | |
| mate-terminal | Yes | Yes | Yes | Yes | No | |
| mltermAUR | Yes | Yes | No | No | Yes | |
| pantheon-terminal | Yes | Yes | Yes | No | No | |
| PuTTY | Yes | No | No | No | No | |
| qterminal | Yes | Yes | Yes | Yes | No | |
| roxtermAUR | Yes | Yes | Yes | Yes | No | |
| rxvt-unicode | Yes | Yes Ctrl+Alt+c | No | No | Optional | |
| sakura | Yes | Yes | Yes | Yes | No | |
| st | Yes | Yes | No | No | No | |
| Terminator | Yes | Yes | Yes | No | No | |
| terminology | Yes | Yes | Yes | No | No | |
| Termite | Yes | Yes | No | No | No | |
| Tilda | Yes | Yes | Yes | No | No | |
| xfce4-terminal | Yes | Yes | Yes | Yes | No | |
| xterm | Yes | Optional[1] | No | No | Yes | |
| Yakuake | Yes | Yes | Yes | No | Optional | |
Special cases
putty
The xclip approach works for putty: one just has to remember that the xclip invocation should be done on the local computer (in another terminal), not on the remote machine to which putty is connected.
urxvt
Selecting text to CLIPBOARD requires the selection-to-clipboard perl extension. See rxvt-unicode#Clipboard for details.
xterm
Access to the CLIPBOARD selection in xterm requires additional steps.
mlterm
In addition to Ctrl+Shift+c, you can use Ctrl+Insert if you do not want to kill processes accidentally.
Tag » Arch I3 Copy Paste
-
How To Copy Paste From Browser To Terminal? - I3 FAQ
-
How To Copy Paste From Browser To Terminal In Arch Linux? - Reddit
-
Copy & Paste Between Terminal(s) And Application Windows In I3
-
Clipboard - ArchWiki
-
Copy / Paste Problems In In Kitty On Arch/i3 - Unix Stack Exchange
-
Save Clipboard To File Using Xclip - ARCH LINUX
-
I3 In Vmware Doesn't Share Clipboard With Host Windows-machine
-
Enable Copy-paste Clipboard In URxvt Terminal Emulator
-
How To Copy And Paste In I3 On Debian - YouTube
-
Configuring The I3 Window Manager - Jason Eckert
-
AntenehDev/Arch-i3 - GitHub
-
Fresh Arch Install In I3-wm: Can't Unmute Audio
-
How Can I Get Clipboard Copy Events From Mac OS X To Carry Over ...