如何在 Windows 终端上添加应用程序?

Kul*_*lfy 3 windows-10 windows-terminal

我已经从 Microsoft Store安装了Windows TerminalUbuntu App。根据应用程序的描述,

Windows 终端是一个新的、现代的、快速的、高效的、强大的和高效的终端应用程序,适用于命令行工具和 shell(如命令提示符、PowerShell 和 WSL)的用户。

要使用 WSL,我需要在 Windows 终端中启动 Ubuntu,但我找不到相应的选项。

截屏

如何在菜单中添加 Ubuntu?

Kul*_*lfy 6

  • 单击设置。

    截屏

  • 选择一个文本编辑器来编辑该 .json 文件。
  • 查找profiles条目并将其添加到 CMD 条目之后,并在其后添加逗号 (,)}以分隔条目。

    {
        "acrylicOpacity" : 0.75,
        "closeOnExit" : true,
        "colorScheme" : "Campbell",
        "commandline" : "ubuntu",
        "cursorColor" : "#FFFFFF",
        "cursorShape" : "bar",
        "fontFace" : "Consolas",
        "fontSize" : 10,
        "guid" : "{GUID of the app in double quotes}",
        "historySize" : 9001,
        "icon" : "Absolute path of icon (with double quotes)",
        "name" : "Ubuntu",
        "padding" : "0, 0, 0, 0",
        "snapOnInput" : true,
        "startingDirectory" : "%USERPROFILE%",
        "useAcrylic" : true
    }
    
    Run Code Online (Sandbox Code Playgroud)
  • 请注意,GUID 必须在{ }.

  • 保存文件。再次单击下拉菜单以检查它是否已添加。

    截图 2

笔记:

  1. 要获取应用程序的 GUID,请参阅此问题:如何获取从 Microsoft Store 安装的应用程序的 GUID?
  2. 您可以从 x48 的任何位置下载 png 格式的徽标。我使用过这个图标和 48x48 大小。