abh*_*tps 83 bash terminal powershell cmd visual-studio-code
我在Windows 10 PC上使用Visual Studio Code.我想将我的默认终端从Windows PowerShell更改为Ubuntu上的Bash(在Windows上).
我怎样才能做到这一点?
Lev*_*ler 186
您也可以通过按F1VS代码并键入/选择终端:选择默认外壳来选择默认终端.
Ana*_*hag 37
我只是在打开的终端中键入以下关键字;
请参阅下图中的详细信息.(VSCode版本1.19.1 - Windows 10 OS)
它也适用于VS Code Mac.我用VSCode(版本1.20.1)试了一下
A. *_*son 14
文件>首选项>设置(Ctrl +,)
在{}内的右边窗口粘贴:
File > Preferences > Settings
(在这里你可以放置你想要的任何其他自定义设置)
检查该路径以确保您的bash.exe文件在那里,否则找出它的位置并指向该路径.
如果您现在关闭VS Code中的终端窗口并重新启动它,它应该使用bash而不是PowerShell打开.
通过运行终端配置您的默认集成终端:选择默认配置文件命令,该命令也可通过终端下拉菜单访问。
请参阅https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles
要在 Visual Studio Code 中更改项目的默认终端:
例如,如果您是 Windows 用户并希望将“命令提示符”设置为默认终端,您可以编写:
"terminal.integrated.defaultProfile.windows": "Command Prompt"
Run Code Online (Sandbox Code Playgroud)
价值观。您可以通过:"Git Bash"
、"PowerShell"
和"Command Prompt"
。
对于 Linux,您将使用terminal.integrated.defaultProfile.linux
;对于 macOS,您将使用:terminal.integrated.defaultProfile.osx
由于您使用 WSL,Visual Studio Code 具有专用的Remote - WSL扩展,因此您可以直接在 Visual Studio Code 中使用 Linux 环境。
\n当您在 Linux 中打开项目时,默认情况下,它使用 Linux 默认 shell(默认为 bash),因此无需配置。
\n如果你想切换到其他配置文件,有Terminal \xe2\x86\x92 Integrated \xe2\x86\x92 Default Profile: Linux部分,所以你可以选择你最喜欢的一个。
\n\n