# 1. 使用 Git 安裝後自帶的終端
首先需安裝 [Git](https://git-scm.com/) , 之後可選如下任一方式
## 1. 在 Git 安裝路徑下的 `bin` 資料夾內可找到 bash.exe 或 sh.exe , 透過其中任一個執行 sh script 即可
ex : (路徑建議前後加上 `"` , 可避免路徑名中包含空格的問題)
> "C:/git/bin/bash.exe" "your-sh.sh"
or
> "C:/git/bin/sh.exe" "your-sh.sh"
為了簡化操作, 可將 git 的 bin 路徑加入環境變數的 `PATH` 中
之後上面的命令可簡化為
> bash.exe "your-sh.sh"
or
> sh.exe "your-sh.sh"
## 2. 右鍵開啟並使用 Git Bash
- 在資料夾中打開右鍵選單 , 選擇 `Open Git Bash Here`
- 執行 sh (這裡需注意的是如果使用絕對路徑 格式並非如 windows 的 C: D: 而是 /c /d )
> "your-sh-path.sh"
# 參考
- [bash - How to run .sh on Windows Command Prompt? - Stack Overflow](https://stackoverflow.com/questions/26522789/how-to-run-sh-on-windows-command-prompt)