Skip to main content

Configuring Tmux copying in WSL

WSL and tmux

After using WSL a while, I became quite annoyed with Windows and tmux not sharing the same copy buffer. In a complete "shot in the dark", I replaced the "reattach-to-user-namespace pbcopy" command in my tmux config (from my macOS machine) with /mnt/c/Windows/System32/clip.exe. Surprisingly, it works! Quite well actually.

I use VI bindings in tmux but I assume some variation of the binds below will also work with the default Emacs bindings. Copying to the Windows clipboard via mouse1 drag-and-release is also configured for convenience.

Read more…