Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

According to wikipedia in the bash shell control+u

Clears the line content before the cursor and copies it into the clipboard

If I'm ssh'ed into a box and try that, the text certainly disappears but I have no idea where it goes. Can I access it somehow? I don't want to have to use xsel or set up x-forwarding, I am just curious if it is stored in some register somewhere remotely. For example, I tried starting vim and typing "*p or "+p to paste from the system clibpoard but am not having any luck.

If I use control+u remotely when ssh'ed to a box, where does it go, and can I access it?

share|improve this question
I think that x-forwarding (which is really just as simple as adding -X to your SSH options) should enable "*y in vim, if vim on the server has X-clipboard support built in. Otherwise, no, there's no shared clipboard. – ams Apr 16 '12 at 16:36
up vote 5 down vote accepted

You can yank (paste) it back somewhere with Ctrl-y as in emacs.

See the "Killing and Yanking" subsection of bash manual "Readline" section.

share|improve this answer
Yes, this is bash's internal clipboard, completely confined to that remote invocation of bash. (There's no notion of an interprocess clipboard in the shell environment; normally X provides this.) – 9000 Apr 16 '12 at 16:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.