Git Bash中无法使用start命令打开文件的问题求助
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

