【问题标题】:Intellij Windows Terminal as terminal (in ide)Intellij Windows Terminal 作为终端(在 ide 中)
【发布时间】:2020-07-23 19:06:33
【问题描述】:

我在 Ubuntu 18.04 中使用 WSL。

在 Intellij 中,我想将终端更改为 Windows 终端(或 Ubuntu 终端),但是当我添加 wt.exe 作为 shell 路径(文件 -> 设置 -> 工具 -> 终端)时,ide 返回带有 Windows 终端的新窗口(不在ide的底部)。

我也用过 Windows Terminal.exe 路径,但是不行。

C:\Users\USER\AppData\Local\Microsoft\WindowsApps\Microsoft.WindowsTerminal_8wekyb3d8bbwe/wt.exe

【问题讨论】:

    标签: windows intellij-idea windows-subsystem-for-linux


    【解决方案1】:

    现在您可以在 IDE 中使用 WSL 终端,只需在 IntelliJ IDEA 的终端设置中使用 wsl.exe 字符串,如 documentation 所述:

    Shell 路径
    指定默认运行的 shell。以下是不同 shell 的一些示例:

    • bash:/bin/bash
    • Z 外壳:/bin/zsh
    • Windows 版 Bash:bash.exe
    • WSL:wsl.exe
    • PowerShell:powershell
    • 命令提示符:cmd.exe
    • Cygwin: "C:\cygwin\bin\bash.exe" --login -i

    【讨论】:

      【解决方案2】:

      您不能使用 GUI 应用程序作为 IntelliJ IDEA 中的终端 shell,请使用命令行应用程序,如 cmd.exepowershell.exec:\Windows\System32\bash.exe

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-01-23
        • 2019-11-20
        • 1970-01-01
        • 2014-09-20
        • 1970-01-01
        • 1970-01-01
        • 2020-02-22
        相关资源
        最近更新 更多