How to copy and paste in PuTTY under Ubuntu?

The behaviour of copy and past in PuTTY is different than in Ubuntu. With PuTTY under Windows I never had a problem how to copy and paste, but under Ubuntu I am always confused. That is why I wanted to write it down. For me, but also for you of course.

Coping from PuTTY

Select the text with the left mouse button and paste with the middle mouse button.

Paste in PuTTY

Select the text you want to paste. Paste in PuTTY with the middle mouse button.

That’s it!

18 thoughts on “How to copy and paste in PuTTY under Ubuntu?”

  1. Ahan! Great, i was searching for it since long! It works! But what if we are using laptop, no middle button :-)! Any idea?


    Bilal Sultan

    1. Under Ubuntu I am just pressing on both buttons together. This simulates the middle mouse button! :-)
      I can not test if it works under Windows, because I do not have any Windows machine at home anymore.
      Success, Arjan

  2. Hi,
    Within putty ou can mark text with the left mouse button, then click left button to copy.
    “Shift+Insert” to paste text copied within putty
    “Ctrl+Shift+Insert” to paste text copied out of putty.
    I still don’t know how to paste text copied in putty to another place :((

    1. Hi Boris,
      Are you talking about PuTTY in Windows? In that case you can use just select the text in PuTTY and paste/Ctrl-V outside of PuTTY.
      Arjan

  3. Thanks. Just made the transition from Window to Ubuntu. I much prefer PuTTY to SSH in the terminal window, primarily because of the PuTTY copy past behavior. Now that I read it, it makes sense. Select to copy, center button to paste. Almost like windows, but not quite.

  4. Hi:

    I solved this issue using 2 methods:

    1. Using PuTTY linux version:
    clicking in both touchpad buttons I simulated the middle button.
    Since Linux Mint distro I’m using had not this middle button simulation activated (The latest version of evdev, version 2.5, changed the default for the middle mouse button emulation code. This change has disabled emulation of the middle mouse button by clicking the left and right mouse buttons) I needed to enable it manually:

    Enabling the middle mouse button emulation adding this to xorg.conf snippet:

    Section “InputClass”
    Identifier “middle button emulation class”
    MatchIsPointer “on”
    Option “Emulate3Buttons” “on”
    EndSection

    2. Using PuTTY WIndows version (I prefer that since I do not need to change distro setting like Xorg, only Wine settings).

    Since wine handles com ports by having a link to the device (ie /dev/ttyUSB0), in the ~/.wine/dosdevices folder, this link would be created as follows, in order to update your wine profile configs:

    ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1

    I prefer this second method, since the copy paste works allways, do not need the middle button simulation and, the sherry in the top of the cake, it NEVER hangs (occasionally PuTTY hangs on some Windows XP installations).

    Otherwise, in case you do not need/want to install wine, the first method is preferable.

    Enjoy.

    Joao

  5. On Ubuntu you can use either both buttons together (which is a pain) or you can press on the roller if you have a Logitech mouse. I love Putty compared to the Ubuntu terminal.

  6. I was actually just about to abandon putty for the terminal because the copy/paste behavior that I loved so much on windows was horrible in ubuntu.

    Then I read your post, Thanks!

    If you don’t find the middle mouse button convenient (I hate it), crtrl+shift+insert to paste in putty (you’ll still need the middle mouse button to paste outside of putty.)

  7. Thanks very much I have been suffered very much while copying the data from putty to other documents.

Comments are closed.