在Best way to use a shell with Cygwin in Windows 7 中已经有人回答了这个问题。那就是启动 CygwinC:\cygwin\bin\mintty.exe -
接着就,随即 $SHELL = /bin/sh
如何使用/usr/bin/bash
默认 shell启动 mintty ?
Jam*_*ger 14
有几种不同的方法可以做到:
bash
如 Salton 所述,指定为 mintty 的命令行参数。SHELL
环境变量设置为 /usr/bin/bash。从 mintty(1) 联机帮助页:
INVOCATION
If a program name is supplied on the command line, this is executed
with any additional arguments given. Otherwise, mintty looks for a
shell to execute in the SHELL environment variable. If that is not
set, it reads the user's default shell setting from /etc/passwd. As a
last resort, it falls back to /bin/sh. If a single dash is specified
instead of a program name, the shell is invoked as a login shell.
Run Code Online (Sandbox Code Playgroud)