How to copy terminal output to clipboard?

I didn’t immediately find any option, in the Gnome terminal a “select all” hotkey can be configured, but this method isn’t optimal even after running clear as the [user@localhost ~] gets also selected. I only want to copy the output of the last command without writing any text file ( don’t know if xsel or xclip can achieve this).

Using any third-party tool is fine as long it’s hosted on Fedora repos. Short & simple commands preferred.

1 Like

You can press the left mouse/touchpad button and move the pointer to start text selection.
In addition, you can use the Ctrl modifier to select a specific area.

The methods to copy/paste the selected text:

You can also use a clipboard manager like GPaste to copy the output of a single command:


that summed it up.

command | fpaste
that one works out of the box I think

1 Like

fpaste uploads to web, please mention this.

1 Like

If you are using Wayland, this is what you really want:

It is in the Fedora repo.

1 Like

I use an xterm window on gnome, and can easily mark (hold left button and move mouse) what I want to copy with the mouse then a right-click brings up the menu to allow copy.
Once that is done it is in the clipboard to easily paste into almost any other window (or elsewhere on the cli in that same window with another right-click)

cat file | clipboard

If you want to know more search for ‘pipe to clipboard’. And find this page

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.