【问题标题】:How to add wsl command line arguments to Windows Terminal configuration?如何将 wsl 命令行参数添加到 Windows 终端配置?
【发布时间】:2021-06-08 03:15:42
【问题描述】:

我的 Windows 终端具有以下 .json 配置:

        {
            "guid": "{926758ba-8c4a-5c36-a9c6-0c4943cd78a1}",
            "hidden": false,
            "name": "Fedora-33",
            "source": "Windows.Terminal.Wsl"
        },

这是从 WSL 数据库自动生成的。

我想添加 wsl 命令行选项 -u user,因为它现在以 root 身份启动。我尝试添加

            "user" : "hxv454"

无济于事。如何配置 WT 以使用特定用户启动我的 wsl 实例?

【问题讨论】:

    标签: windows-subsystem-for-linux windows-terminal


    【解决方案1】:

    学习

    How do I get Windows 10 Terminal to launch WSL?

    搜索我找到并使用过的“wsl”

    "commandline": "wsl -d Fedora-33 -u hxv454"
    

    它成功了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-14
      相关资源
      最近更新 更多