Visual Studio Code, how to switch from powershell.exe to cmd.exe

后端 未结 7 2274
忘了有多久
忘了有多久 2021-02-01 00:43

I would like to switch from powershell.exe to cmd.exe in the terminal but i\'m not sure how to do so. Provided screenshot for clarification.

7条回答
  •  野性不改
    2021-02-01 01:01

    From Visual Studio if you have powershell set as your default integrated terminal, after you call it with Ctrl-` (control backtick) - that toggles from the terminal to your files panel and back. Call the terminal, It will show as 1: pwsh in the dropdown box. From the powershell command line type bash and enter. You have your bash prompt $. In the dropdown you now see 1: bash.

    You can type cmd from either the ps C: or the $ bash prompt and open the windows command prompt. C:> and exit to exit them.

    You can open up multiple terminals. Say powershell (pwsh) is your default one. A new terminal will show as 2: pwsh which you can change to a cmd one. The same if you open a third. Change it to bash. You now have 3 terminals 1: pwsh, 2: cmd, and 3: bash. You can select whichever one you want to work with from the dropdown. You can of course exit any of them.

    No doubt you've seen that when you are running node.js, the terminal becomes node.

提交回复
热议问题