Windows Terminal is one of the best terminal tools for connecting to WSL or remote Linux servers. For efficiently using the Terminal, understanding some keyboard shortcuts is essential.
Here are the steps to copy and paste WSL Linux/bash terminals in Windows 11.
To copy text contents from a WSL window or Windows Terminal (wt)
To copy some text from a Windows Terminal WSL terminal windowSelect the specific text to copy, then Press the Enter Key
Contents will be copied to the Windows clipboard. You may paste it into any text editor, email, web form, etc.
To paste text contents to a WSL window
To paste copied text in WSL terminal windowMouse Right-Click
Note whatever you have in your clipboard will be pasted onto the terminal screen. All previous lines will be executed without confirmation if the clipboard has multiline contents.
These steps are tested in Windows 10, with Ubuntu 20.04 WSL
Update 1 (May 2022): Recent versions of Windows Terminals / WSL screen support the generic copy-paste keyboard combinations, that is:
- Ctrl + C to copy
- Ctrl + V to paste.
In this how-to guide, we have gone through the steps to enable or use the windows terminal WSL copy-paste feature.
Related Article: How do you enable right-click paste in VScode and select copy?
Update 2 (July / 2022): The same works in Windows 11 & Ubuntu 22.04.