How do you copy+paste text from the terminal to a web browser and vice versa?

5,631

Solution 1

In X11, you have two "clipboard" equivalents:

  1. The 'CLIBPBOARD' selection – like the Windows clipboard.

    To copy, use CtrlShiftC if in GNOME Terminal, but CtrlC elsewhere.

    To paste in GNOME Terminal, press CtrlShiftV; in other programs use CtrlV.

  2. The 'PRIMARY' selection – somewhat more temporary, text-only.

    Simply select text to copy.

    Middle-click the mouse to paste. (ShiftInsert usually works to paste, except in Firefox, sadly.)

Solution 2

Most Linux terminals copy the text simply by marking it. To paste it, just go to the web browser's URL bar and middle-click to paste.

Sometimes it might be the right mouse button, and it should always work with Shift + Insert.

Share:
5,631

Related videos on Youtube

Chuck Testa
Author by

Chuck Testa

Updated on September 18, 2022

Comments

  • Chuck Testa
    Chuck Testa over 1 year

    I was just wondering if there's a simple way to do this, or whether it's completely dependent on the terminal you use. If that's the case, then is there a standard that most terminals go by?

    Right now I'm using Ubuntu and I assume that I have GNOME terminal.

  • Admin
    Admin over 12 years
    Issuing Ctrl+C and Ctrl+V in the shell will not work as copy-paste by default. By default Ctrl+C sends the SIGINT signal to the shell and Ctrl+V interprets input escape character sequences.