A terminal emulator for Windows Subsystem for Linux (WSL), includes mintty, wslbridge, cbwin, and some other useful tools.
-
Run
open-wsl.exe
to open a WSL terminal in current directory (need to be on a local NTFS volume, more details). -
Run
tools/add-open-wsl-here-menu.js
to add aOpen WSL Here
context menu to explorer.exe (runtools/remove-open-wsl-here-menu.js
to remove it). If you are using Total Commander, read Use wsl-terminal with Total Commander. -
run-wsl-file.exe
can run any .sh (and any others like .py/.pl/.php) script files in wsl-terminal, supportOpen With
context menu in explorer.exe. -
vim.exe
can open any text files in vim (in wsl-terminal), supportOpen With
context menu in explorer.exe.vim.exe
can be renamed toemacs.exe/nvim.exe/nano.exe/...
to open files inemacs/nvim/nano/...
.
Set use_cbwin=1
in etc/wsl-terminal.conf
( read security warning before using it), then bin/{wrun/wstart/wcmd}
can run Windows programs. Start open-wsl.exe
, run this command to install wrun/wstart/wcmd
:
cd bin && ./install_cbwin.sh
Usage:
## Enter a DrvFs directory ##
$ cd /mnt/c
## Run with cmd /C ##
$ wcmd ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
...
## Run a .bat/.cmd file ##
$ wcmd example.bat
## Run with CreateProcess() ##
$ wrun notepad example.txt
## Run with cmd /C start ##
$ wstart example.txt
## Run a powershell command ##
$ wrun powershell -c ps
## Kill notepad.exe ##
$ wrun taskkill /f /im notepad.exe
etc/wsl-terminal.conf
is wsl-terminal config file.
[config]
title=" "
shell=bash
use_cbwin=0
use_tmux=0
usr/share/mintty/themes/
are theme files, use themes.
etc/minttyrc
is mintty config file, mintty tips.
Alt + Enter
: Fullscreen
Alt + F2
: New window
Alt + F3
: Search text
Ctrl + [Shift] + Tab
: Switch window
Ctrl + =+/-/0
: Zoom
Ctrl + Click
: Open URL or dir/file under the cursor
open-wsl.exe
-a: activate an existing wsl-terminal window, if use_tmux=1, attach the running tmux session.
Run build.bat
, make sure wget/tar/xz-utils/gzip/unzip/p7zip-full (apt install wget tar xz-utils gzip unzip p7zip-full) are installed in WSL.
Cygwin DLL: https://cygwin.com/licensing.html
mintty: GPLv3+
wslbridge: MIT
cbwin: MIT
wsl-terminal: MIT