You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Git Bash中无法使用start命令打开文件的问题求助

Fix Git Bash start Command Error When Opening .txt Files

Root Cause

Git Bash ships with its own start script at /usr/bin/start, which takes precedence over Windows' native start.exe from C:\Windows\System32—even if you added System32 to your Path. This conflict is why you’re seeing the "No such file or directory" error.

Solutions

1. Explicitly call Windows' start.exe

Use the full path to bypass Git Bash’s script:

/c/Windows/System32/start.exe your-file.txt

Or use Windows-style path with forward slashes:

C:/Windows/System32/start.exe your-file.txt

2. Alias the Windows command

Add an alias to your ~/.bashrc or ~/.bash_profile to make start point to the Windows executable by default:

alias start='/c/Windows/System32/start.exe'

Reload the config to apply changes:

source ~/.bashrc

Now start your-file.txt will work as expected.

3. Use cmd /c start as a workaround

Invoke the Windows command via CMD to avoid the Git Bash script:

cmd /c start your-file.txt

4. Adjust Path precedence

Check if System32 comes before /usr/bin in your Git Bash Path:

echo $PATH

If /usr/bin is listed first, prepend System32 to your Path in .bashrc:

export PATH="/c/Windows/System32:$PATH"

Reload the config with source ~/.bashrc and test again.


内容的提问来源于stack exchange,提问作者Enrique Milo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 21:24:55