[bash] Copy Paste in Bash on Ubuntu on Windows

How to execute a copy paste operation from Windows 10 to the Bash on Ubuntu on Windows environment?

I tried the following:

  • ctrl + shift + v
  • right click to paste

Any suggestions?

The answer is


Edit / Paste from the title bar's context menu (until they fix the control key shortcuts)


For just copying (possibly long) texts to the Windows clipboard, I have found that just piping the output to clip.exe (including the .exe file extension) works fine for me. So:

$ echo "Hello World" | clip.exe

lets me paste Hello World using Ctrl-V anywhere else.

Now that I have posted this, I notice that related question Pipe from clipboard in linux subsytem for windows includes this and a command solution for pasting from the Windows clipboard as well.


To get right-click to paste to work:

  • Right-click on the title bar > Properties
  • Options tab > Edit options > enable QuickEdit Mode

enter image description here


For pasting into Vim in the terminal (bash on ubuntu on windows):

export DISPLAY=localhost:0.0

Not sure how to copy from Vim though :-(


That turned out to be pretty simple. I've got it occasionally. To paste a text you simply need to right mouse button click anywhere in terminal window.


At long last, we're excited to announce that we FINALLY implemented copy and paste support for Linux/WSL instances in Windows Console via CTRL + SHIFT + [C|V]!

You can enable/disable this feature in case you find a keyboard collision with a command-line app, but this should start working when you install and run any Win10 builds >= 17643.

New Console Properties showing CTRL + SHIFT + C/V option

Thanks for your patience while we re-engineered Console's internals to allow this feature to work :)


Ok, it's developed finally and now you are able to use Ctrl+Shift+C/V to Copy/Paste as of Windows 10 Insider build #17643.

You'll need to enable the "Use Ctrl+Shift+C/V as Copy/Paste" option in the Console "Options" properties page:

enter image description here

referenced in blogs.msdn.microsoft.com/


You can use AutoHotkey (third party application), the command below is good with plain alphanumeric text, however some other characters like =^"%#! are mistyped in console like bash or cmd. (In any non-console window this command works fine with all characters.)

^+v::SendRaw %clipboard%

Like it has been written before:

  • Right Click on Bash on Ubuntu on Windows Icon if you have it on a Task Bar Shortcut Icon
  • Click on Properties
  • Select Options Tab on the Properties Window
  • Check the QuickEditMode option
  • Click Apply

Now you are able to open a new Bash Terminal and just use Right-Click to paste

In order to be able to copy from Terminal, Just use CTRL+M and this will enable you to select and copy selected Text.


you might have bash but it is still a windows window manager. Highlite some text in the bash terminal window. Right click on the title bar, select "Edit", select "Copy", Now Right Click again on the Title bar, select "Edit" , Select "Paste", Done. You should be able to Highlite text, hit "Enter" then Control V but this seems to be broken


Alternate solution over here, my windows home version Windows Subsystem Linux terminal doesn't have the property to use Shift+Ctrl (C|V)

Use an actual linux terminal![enter image description here]1

  • Install an X-server in Windows (like X-Ming)
  • sudo apt install <your_favorite_terminal>
  • export DISPLAY=:0
  • fire your terminal app, I tested with xfce4-terminal and gnome-terminal

windows #ubuntu #development


As others have said, there is now an option for Ctrl+Shf+Vfor paste in Windows 10 Insider build #17643.

Unfortunately this isn't in my muscle memory and as a user of TTY terminals I'd like to use Shf+Ins as I do on all the Linux boxes I connect to.

This is possible on Windows 10 if you install ConEmu which wraps the terminal in a new GUI and allows Shf+Ins for paste. It also allows you to tweak the behaviour in the Properties.

The Console looks like this:ConEmu Console

Copy options:ConEmu Copy properties

Paste options:ConEmu Paste properties

Shf+Ins works out of the box. I can't remember if you need to configure bash as one of the shells it uses but if you do, here is the task properties to add it:ConEmu Bash Task Properties

Also allows tabbed Consoles (including different types, cmd.exe, powershell etc). I've been using this since early Windows 7 and in those days it made the command line on Windows usable!


Examples related to bash

Comparing a variable with a string python not working when redirecting from bash script Zipping a file in bash fails How do I prevent Conda from activating the base environment by default? Get first line of a shell command's output Fixing a systemd service 203/EXEC failure (no such file or directory) /bin/sh: apt-get: not found VSCode Change Default Terminal Run bash command on jenkins pipeline How to check if the docker engine and a docker container are running? How to switch Python versions in Terminal?

Examples related to ubuntu

grep's at sign caught as whitespace "E: Unable to locate package python-pip" on Ubuntu 18.04 How to Install pip for python 3.7 on Ubuntu 18? "Repository does not have a release file" error ping: google.com: Temporary failure in name resolution How to install JDK 11 under Ubuntu? How to upgrade Python version to 3.7? Issue in installing php7.2-mcrypt Install Qt on Ubuntu Failed to start mongod.service: Unit mongod.service not found

Examples related to command-line

Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Flutter command not found Angular - ng: command not found how to run python files in windows command prompt? How to run .NET Core console app from the command line Copy Paste in Bash on Ubuntu on Windows How to find which version of TensorFlow is installed in my system? How to install JQ on Mac by command-line? Python not working in the command line of git bash Run function in script from command line (Node JS)

Examples related to windows-10

Starting ssh-agent on Windows 10 fails: "unable to start ssh-agent service, error :1058" How to install OpenSSL in windows 10? Anaconda Installed but Cannot Launch Navigator Conda command is not recognized on Windows 10 Copy Files from Windows to the Ubuntu Subsystem Hyper-V: Create shared folder between host and guest with internal network Why Local Users and Groups is missing in Computer Management on Windows 10 Home? VMware Workstation and Device/Credential Guard are not compatible pip not working in Python Installation in Windows 10 Copy Paste in Bash on Ubuntu on Windows

Examples related to windows-subsystem-for-linux

System has not been booted with systemd as init system (PID 1). Can't operate Copy Files from Windows to the Ubuntu Subsystem Copy Paste in Bash on Ubuntu on Windows Disable beep of Linux Bash on Windows 10