Home > Linux > Paste-To-Terminal Keyboard Shortcuts

Paste-To-Terminal Keyboard Shortcuts

Update: as pointed out by SFA_AOK in the comments two more shortcuts have been added.

For ages man has toiled with pasting data into a terminal window by using the mouse. Right-Click, paste. Middle-click, Paste. Its all very tedious for all of us keyboard warriors. Those of us that are slowed down by the mouse and its pagan graphical goodness. No more! I present to you keyboard shortcuts that work within the terminal!

ctrl-insert : copy

shift-insert : paste

shift-delete : cut

shift-ctrl-C : copy

shift-ctrl-V : paste

Really. Give it a try. Copy something. Open a terminal. Paste. Mouse not required. What a beautiful day it is to be a keyboard warriors. You learn something new everyday.

(queue the small print) yes it is a little weird to get used to new shortcuts but it’ll be worth it. Plus, for those of us using Dvorak anyway the old-fashioned ctrl c v x aren’t in optimal positions anyway. Thanks goes to Aaron for sharing this tidy little nugget of keyboard goodness.

Categories: Linux Tags:
  1. SFA_AOK
    February 25th, 2007 at 10:40 | #1

    Maybe I’ve missed the point but: what was wrong with ctrl-shift C and ctrl-shift V?

  2. SFA_AOK
    February 25th, 2007 at 12:54 | #2

    Ah OK, just wanted to make sure you weren’t talking about something else that I was missing out on :)

  3. February 25th, 2007 at 17:36 | #3

    How would you use ctrl-insert? Is it the exact same as shift-ctrl-C?

    Also, what exactly is shift-delete doing?

  4. February 25th, 2007 at 18:16 | #4

    For the record, Christer is talking about KDE’s Konsole.

    Thanks for these as I never new copy or cut. I miss gnome-terminal’s shift+ctrl+c though.

  5. February 26th, 2007 at 03:40 | #5

    It’s not “terminal” shortcuts, it’s Konsole.

  6. Patrick
    February 26th, 2007 at 13:49 | #6

    “Also, what exactly is shift-delete doing?”

    I’m not sure about gnome, but in KDE shift+delte just deletes a file instead of moving it to the trash.

  7. Sam
    April 30th, 2007 at 07:23 | #7

    how do you select the stuff to copy and paste?

    And since your hand is already on the mouse to select, why shift your hand to the keyboard to do the rest?

  8. November 9th, 2007 at 06:21 | #8

    Thanks, I was looking how to paste into (u)xterm with keyboard, shift-insert works for me.

  9. Rocco Stanzione
    January 21st, 2008 at 18:41 | #9

    One of my favorites is “!!”, which gets expanded to your last full command. Like, “vi /etc/apt/sources.list” – oops, “sudo !!”. Or, “rm testfile.c”, “svn !!”. Or, “find . -name ‘*!’” followed by “rm $(!!)”. You get the idea.

  10. beerfan
    January 22nd, 2008 at 20:42 | #10

    The ctrl-shift-c and ctrl-shift-v keystrokes have to be some of the worst inspired ever.

  11. roxport
    February 24th, 2008 at 11:53 | #11

    Works for pasting things from web browser (Win PC IE) into vi (PuTTY session, using screen).

  12. Jindofox
    June 5th, 2008 at 06:16 | #12

    Neat – but the default Adblock Plus configuration relies on ctrl-shift-V combo to open the blockable items list. The instructions to change this are at http://adblockplus.org/en/faq_customization#shortcuts

  13. magaphoto
    June 30th, 2008 at 09:56 | #13

    (humor)

    You had me until you said you were using Dvorak keyboarding.

    It reminded me of the scene in “Raising Arizona” whence the old con os stream-of-conciousness(ing) on the top bunk and he mentions “We ate sand.”

    (Thanks for the hint. Useful.)

    magaphoto

  14. July 12th, 2008 at 09:29 | #14

    If you want to use Ctrl-C and Ctrl-V for cut and paste you can use Alt-F2 > gconf-editor > apps > gnome-terminal > keybindings > look for copy and paste > right-click > edit key > delete

  15. Bob
    April 19th, 2010 at 17:03 | #15

    Doesn’t work :(

    I suppose this only works in a specific, unmentioned terminal? I’m using xterm in openbox in Debian.

  16. Aree
    February 20th, 2011 at 06:10 | #16

    In regard to change keybinding for copy to CTRL-C – This is not a good idea as in all LINUX based systems CTRL-C is reserved for killing a running process

  17. February 21st, 2011 at 16:36 | #17

    it does not fuckin work with mono.

  18. Pablo Pages
    June 6th, 2011 at 18:05 | #18

    I ‘m trying to perform the instructions below but I am cofused.
    Copy and paste means type in the Terminal window as well?
    Thans for your help.
    TERMINAL
    Launch a Terminal window (in /Applications/Utilities) and copy and paste:
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

  19. Oimel
    June 19th, 2011 at 11:47 | #19

    Great!!!
    I searched a long time, I had HyperTerminal 7.0 PE – for 21 days…
    Now I can use my favourite again: Putty

    Thanks a lot, mate, you saved my day :D

  1. March 1st, 2007 at 14:43 | #1
  2. January 7th, 2010 at 18:48 | #2