Windows 10 build 14316: Ctrl + v doesn't work on Bash on Ubuntu on Windows

53

8

On the new Windows 10 insider build 14316, I haven't been able to use Ctrl + V (shortcut for paste) on the new Bash on Ubunbu on Windows app. Has anybody else had this issue? Any solutions?

I have edited the app's properties to enable control shortcuts and insert. Also, I have tried Ctrl + Shift + V and Shift + Insert and neither work.

Sergei Wallace

Posted 2016-04-13T03:25:18.353

Reputation: 2 239

1Does Ctrl+Shift+V work? That's what the shortcut is in many Linux terminals. Otherwise, I seem to remember that middle click pastes in cmd (but I don't know for sure). – tanner – 2016-04-13T03:58:27.083

Ctrl + Shift + v doesn't work either. And I don't have a middle click. – Sergei Wallace – 2016-04-13T03:59:57.333

if the original bash doesn't support if, Windows 10 will also not support it. Does it work in a real Ubuntu? – magicandre1981 – 2016-04-13T04:33:40.677

1I don't know, I've never used the real Ubuntu. I have Windows, and hence was thrilled when the announced that they would have Bash. It just sucks not being able to copy and paste quickly. They support it for the command prompt though, so maybe they just haven't added it for their bash shell yet, or forgot. Or it's a bug, idk. – Sergei Wallace – 2016-04-13T05:17:33.580

This question may explain why. Remember, you are essentially running Linux, so it will behave differently than you may expect if you're only used to how Windows works. – heavyd – 2016-04-13T05:47:25.847

They just suggest shift + insert or Ctrl + Shift + v. Neither of those work for me though. Have you tried it? Any of it work for you? – Sergei Wallace – 2016-04-16T18:35:42.420

Does clicking the window's icon (in the upper-left) produce a menu with Edit as one of its submenus? If so, Paste might be an option there. – Ben N – 2016-04-16T18:51:27.603

Yeah, that works. Is there a shortcut for that? Or a way to make a shortcut? – Sergei Wallace – 2016-04-16T18:55:27.873

What's interesting is that I can't paste from edit initially upon opening the Bash app. It's grayed out and only copy is available. Only when I do Ctrl + V (which just types ^V) can I access the paste option. – Sergei Wallace – 2016-04-16T19:10:24.970

There's an issue open for this problem here, it seems it will be fixed in a future release: https://github.com/Microsoft/BashOnWindows/issues/1471

– None – 2017-05-04T00:18:21.933

@SergeiWallace the feature is now part of 1809 update

– magicandre1981 – 2019-02-07T15:28:36.613

The current best answer is down below (https://superuser.com/a/1319874/551544). This is one of the cases where SO's voting mechanism is not keeping pace.

– dreua – 2019-03-21T22:46:24.687

Answers

45

Why don't you guys just Right Click? here is how to enable copy and paste:

  1. Go to the top of the bash window, right click, go to properties
  2. Check the box that says Quick edit Mode, and you are set!

    Copy and Paste Enabling on Bash for Windows 10

Good day!

-- Activate Quick Edit mode, then mouse left-click is select text, right DOUBLE-click is PASTE

Ozl

Posted 2016-04-13T03:25:18.353

Reputation: 632

10Helpful but I would say that "QuickEdit Mode" is not a hugely transparent label for saying "allow right click paste" so not surprising it was missed. – Nate – 2016-09-28T09:45:13.223

27My reason for not right clicking is simple: I don't want to move my hand to the mouse if I can avoid it. Keyboard shortcuts exist for a reason, and should be maintained across the platform (I don't really care what the shortcut is for copy&paste, as long as there is one). – Jed Daniels – 2017-01-11T18:28:54.863

FWIW, for me, right SINGLE-click is paste – Michael – 2017-02-08T04:55:58.820

7Right click is not ctrl+v... – nicowernli – 2017-03-01T21:47:27.690

enabling Ctrl key didn't solve the problem for me :( – amigo421 – 2017-05-30T07:46:25.983

Doesn't work for pasting in SSH password. – Calvin Fisher – 2017-06-06T12:38:37.547

3Doesn't work for me even though my settings were already set up as in the screenshot. Asking why don't we just right click is kind of annoying. The question was about getting the keyboard shortcut working -- you're saying why not just not use the keyboard :-[ – jcollum – 2017-06-28T15:07:08.070

7This is not a real solution to the issue. – Zoey – 2017-07-01T22:36:18.260

2Why is this marked the answer when it doesn't answer the specific question about keyboard shortcut ctrl+v? – Manachi – 2017-09-12T07:41:52.727

@Zoey I posted the real solution that works since Win10 1809

– magicandre1981 – 2019-03-19T15:38:06.997

11

The main issue, I believe, is that cmd.exe isn't dealing well with the bash environment. By itself the new cmd.exe actually does support Ctrl+v but whilst running bash, it doesn't.

My workaround is to use ConEmu. It's much superior to cmd.exe alone and even gives you color highlighting when running bash. I've tested it and Ctrl+v does work. As a nice plus, you get a tabbed terminal.

Tiago Espinha

Posted 2016-04-13T03:25:18.353

Reputation: 211

1I downloaded it. How do I configure Bash to use ConEmu instead of the normal command prompt? – Sergei Wallace – 2016-04-17T16:01:09.053

ConEmu is sort of a wrapper around cmd.exe. Just by running the plain cmd.exe within ConEmu should allow you to paste by using CTRL+V. – Tiago Espinha – 2016-04-18T08:56:30.740

@spwallace if you've installed bash before ConEmu, the first time you start ConEmu (which I am doing right at this very moment) the fast configuration offers to "Choose your startup task or even a shell with arguments" and bash is there. But also once you started ConEmu, the green plus menu besides the search bar also offers all sorts of shells. – chx – 2017-05-05T01:01:47.573

ConEmu solved the Ubuntu Bash "Ctrl + V" problem for and a nice thing is that ConEmu is Open Source Software (BSD license). Plus it fixes the awful "directory path blue" that is just unreadable on black background. – Alex – 2017-07-15T12:29:00.873

Thank you. I've installed ConEmu and it's looking great so far. – Manachi – 2017-09-12T07:47:44.600

5

As far as I know there's no 'good' solution out there (quickedit paste doesn't seem to work).What I would suggest is this: create an autohotkey script:

SetTitleMatchMode, 2
#IfWinActive, bash
^v::
SendInput {Raw}%clipboard%
return

mgrant24601

Posted 2016-04-13T03:25:18.353

Reputation: 51

1I have ConEmu running but I do not want to use Ctrl + V because that's used by nano so I used +^v::. Also, since ConEmu doesn't always have bash in the window, I used #IfWinActive ahk_exe ConEmu64.exe – chx – 2017-05-14T06:54:17.480

5

Starting with at least Windows 10 Insider build 17643, you can use Ctrl+Shift+C/V as Copy/Paste if you enable it in the bash options:

enter image description here

This feature is part of the October 2018 Update (1809 - Build 17763).

magicandre1981

Posted 2016-04-13T03:25:18.353

Reputation: 86 560

any update on when this is coming to public? – Felix Böhme – 2018-12-12T16:01:48.703

@FelixBöhme Felix, this is part of 1809 October 2018 Update Build 17763 – magicandre1981 – 2018-12-12T20:19:29.810

It is public now. – dreua – 2019-03-21T22:44:27.980

@dreua I already posted that it is part of the 1809 update – magicandre1981 – 2019-03-22T14:41:10.497

3

As we figured out in the comments, the Paste entry in the window's system menu only activates after pressing Ctrl+V once, which is unusual. After that, though, you can use the sequence Alt+Space, E, P. (Courtesy of this Stack Overflow answer by Nescio.) That's not optimal, but it works.

If the Bash on Ubuntu on Windows window has a Properties entry in that menu, you might be able to check the "QuickEdit Mode" box on the Options tab to allow right-clicking in the window to count as a paste.

Ben N

Posted 2016-04-13T03:25:18.353

Reputation: 32 973

weird... Alt+Space doesn't bring up the menu like it should either. – Michael – 2017-02-08T04:57:26.027

@Michael same here; this bash in windows thing is pretty anemic – jcollum – 2017-06-28T15:06:15.340

1

The problem is not specific to "BASH on Ubuntu". All Windows commandline windows experience this including cmd and powershell. Access the window menu under the icon in the top left (another answer mentioned alt+space, this opens the window menu). Choose defaults. Enable QuickEdit mode.

By default, in QuickEdit mode, highlighting copies and right click pastes. (Before Win 10, it still doesn't get you ctrl+c and ctrl+v).

Xalorous

Posted 2016-04-13T03:25:18.353

Reputation: 459