I've seen plenty of questions on how to copy-paste in and out of windows bash. Answers range from tough luck to using screen, which may not be for everyone. This is even worse for vim users, since you can't effectively use the clipboard to paste code into vim properly (a regular non-vim paste such as right click will cause many formatting issues).

It recently occurred to me there are quite a few emulators which work nicely as a Linux user expects - putty, git bash, I think cygwin as well but I haven't used that in ages.

This will allow this much wanted functionality - shift-insert pasting and an easy mark copy, plus allowing vim to access the clipboard via the " register.

Does anyone have an idea on how to make windows bash use one of these as a terminal, even from within, as another process?

To be clear, I know of all the workarounds (quick edit mode, using screen, etc...). Screen is probably the best. I'm looking for specifically using the terminal from some other program as an alternative, since this would be a true solution (if possible of course!).

  • You can paste in putty session or even editing a vim file using your windows clipboard just pressing shift+insert – OscarAkaElvis Oct 22 '17 at 8:54
  • Yeah I know that's the reason why this is a comment and not an answer. – OscarAkaElvis Oct 22 '17 at 10:01

Edited Answer: Using wsl-terminal

WSL Terminal is a terminal emulator for Windows Bash, based on mintty and wslbridge.


contains run-wsl-file.exe(can run any .sh/.py/.pl/.php/... script files in wsl-terminal) and vim.exe(can open any text files in vim, support Open With context menu in explorer.exe. vim.exe can be renamed to emacs.exe/nvim.exe/nano.exe/less.exe/... to open files in emacs/nvim/nano/less/...).

And it contains tmux too.

A word from OP

This is awesome, as it solves completely the copy-paste problems. It can be integrated into the window manager, and changing the bash shortcut to

`C:\path\to\wsl-terminal\open-wsl.exe -l`

will start a bash terminal in home just like running 'bash for windows'. Finally, this is very lightweight requires no installation.

Old answer:

According to this question/answer you should be able to enable 'Quick Edit Mode', which should allow you to use CTRL+C and CTRL+V for copying/pasting, by right-clicking at the top of the window, selecting properties and checking "Quick Edit Mode".

About using other terminal for windows bash: You could try setting up X server and then install your favorite terminal emulator (from linux) and see if copying/pasting works in there (which it should as it will be running on the X server).

  • This is not the answer to what I asked. I was specific for a reason. – kabanus Oct 22 '17 at 11:05
  • @kabanus I am really not sure there is way to make mintty or putty use windows bash libraries instead of their own. – sipral Oct 22 '17 at 11:11
  • @kabanus wsltty (Mintty as a terminal for WSL) might be what you are looking for? – sipral Oct 22 '17 at 11:15
  • Might be a eureka - I followed your hint to wsl-terminal. I'll have a look. If you know how to get it running as the default windows-bash application you can edit your answer. – kabanus Oct 22 '17 at 11:19
  • @spiral you've got it - amend your answer with a brief overview of wsl-terminal and get your internet points. – kabanus Oct 22 '17 at 11:29

If you are (like me) used to the Putty console and already have CygWin installed, then you should use wslbridge (part of wsltty and WSL Terminal anyway) and bridge it to PuttyTray. It's easy to compile. Then you open up PuttyTray.exe select Cygwin mode and type in wslbridge.exe (or whatever binary name you used when copying/installing) in the Command box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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