如何将 bash 定义为默认 Windows 终端命令处理器?

How to define bash as default Windows Terminal command processor?

Microsoft 已发布 Windows Terminal at Windows Store, which allows process commands using PowerShell, Command Prompt and Bash (using Windows Subsystem for Linux) 的预览版。

由于 PowerShell 是默认处理器,每次启动终端时,我都需要再次将其更改为 Linux Bash.

是否可以将默认处理器定义为 Linux 而不是一遍又一遍地重置它?

您需要点击下拉菜单中的'Settings'菜单项

然后应该在默认 JSON 编辑器中打开设置 json 文件。请查找 'profiles' 部分并为您的 bash 个人资料复制 guid。

然后只需将复制的 guid 粘贴到 'globals' 部分的 'defaultProfile' 键中: