Hi all. After wanting true color support in Mosh (to use Brow.sh), I also wanted to integrate it more tightly with Windows. Since I reckon more people will be wanting to accomplish this, here is a guide.
- Install Linux Subsystem for Windows if you haven't already (https://docs.microsoft.com/en-us/windows/wsl/install-win10) (I use Ubuntu)
- Make sure you can execute
bash
from a CMD prompt. - Go into the bash environment by executing
bash ~
in CMD prompt - Install Mosh-dev (for up-to-date version) from https://launchpad.net/~keithw/+archive/ubuntu/mosh-dev by doing
sudo add-apt-repository ppa:keithw/mosh-dev
thensudo apt-get update
- Create a new mosh.bat file on your Desktop with the following contents
@echo off
bash ~ -c "mosh %*"
This launches a Linux bash and passes all the arguments you passed to the batch file on to the mosh program there.
- Place the mosh.bat file somewhere in your Path (I ended up making a C:\bin\ directory, putting it there and adding that to my path)
You should now be able to just open a CMD window and type mosh your.server.com
and it should appear in the same window, as if it was running on Windows directly.
Is it easier just do wsl mosh user@server?