Got a Windows dev VM where you can't install WSL? Here's how to get Claude Code working with just Git Bash.
The Fix
Add these to your .bashrc
:
export NPM_CONFIG_IGNORE_SCRIPTS=true
export SHELL=/c/Program\ Files/Git/bin/bash.exe
Then:
source ~/.bashrc
npm install -g @anthropic-ai/claude-code
Done.
Why It Works
Git Bash provides enough Unix-like environment for Claude Code. The SHELL
export tells it where to find bash, and NPM_CONFIG_IGNORE_SCRIPTS
prevents install script issues.
Caveats
This is a workaround, not official support. Works fine in my vm, let me know if it also works on your machine!
Tested on Windows Server 2022 with Git for Windows 2.50.0.windows.1
Recently, I found it became very slow when I am logging onto my development VM, a windows server 2012R2 instance through Remote Desktop. There are many kinds of solutions in Google's search results. I tried many of them and found only this one suits me.
On the Windows Server 2012 machine, disable the Large Send Offload via the following steps:
Open Network Connections.
Click Change adapter settings
Right-click the icon of the Network card and select Properties.
In Networking tab, click Configure… button.
In the next window, switch to Advanced tab.
Click the Large Send Offload Version 2 (IPv4) and change the value to Disabled.
Click the Large Send Offload Version 2 (IPv6) and change the value to Disabled.
Your RDP connection will disconnect right away after you apply the change. Don't worry, connect it back and you will find the annoying delay disappears!
Reference
I use the Wubi-pinyin input method on macOS and Linux systems by installing the Rime input method framework. On a Windows system, Rime is also available if you have the Administrator privilege. Unfortunately, I am only a standard user on my laptop at work. So I have to find a not-bad alternative and the built-in Microsoft Wubi looks like a good choice.
It actually tastes delicious. No compatible issue, it is Wubi-pinyin compatible, and very fast. The only thing I might complain about is that you cannot press Enter key to send out the code you input onto the screen, but pressing the Shift key twice did the trick.
In total, it is a good choice, and most importantly, it is built-in.
One of my old classmates asked me to fix the issue that her computer cannot print anything. Thanks to TeamViewer, I could connect to her computer then fix the issue. I found that the Printer Spooler service is down and could not start. When you start it, it started and then automatically shuts down in 2 seconds. Google helped me.
For this case, in short: Remove all files in C:\Windows\system32\spool\PRINTERS
directory
After that, the service could start, and all printers came back and worked.