Windows 上的 Ubuntu 作为 VS Code 终端 - 可执行路径 [英] Ubuntu on Windows as VS Code terminal - executable path

查看:26
本文介绍了Windows 上的 Ubuntu 作为 VS Code 终端 - 可执行路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个相关问题,但它详细介绍了 WSL 的方法,在较新版本的 Windows 中,Linux 发行版是不再是测试版,它们是通过 MS 应用商店提供的.

There is a related question but it details the approach for WSL, in newer versions of Windows, the Linux distributions are not beta anymore and they are provided through the MS app store.

我在哪里可以找到 Windows 可执行文件上 Ubuntu 的路径?(不是 WSL.)我尝试在图标上右击找到属性,但它不存在,它似乎是某种特殊的快捷方式.

Where do I find the path to Ubuntu on Windows executable? (Not WSL.) I tried right-clicking on the icon to find Properties, but it is not there, it seems to be some special kind of a shortcut.

推荐答案

如果您安装了多个发行版,您可以阅读如何单独启动一个发行版.

If you have multiple distros installed, you can read this how to launch one individually.

https://msdn.microsoft.com/en-us/commandline/wsl/wsl-config

但是如果你只安装了 1 个,它会默认选择那个

However if you only have 1 installed, it will pick that one by default

启动和运行 WSL 的三种方式:

There are three ways to launch and run WSL:

wsl.exe 或 bash.exe
wsl -c [命令] 或 bash -c [命令]
[发行版] 即 ubuntu -- 这与从 Windows 菜单启动已安装的应用程序相同.

wsl.exe or bash.exe
wsl -c [command] or bash -c [command]
[distro] ie ubuntu -- this is the same as launching the installed app from the Windows menu.

在前两种情况下,WSL 必须选择要运行的发行版 - 默认发行版.如果您没有明确设置默认值,它将是第一个安装的.

In the first two cases, WSL must pick a distribution to run - a default distribution. If you don't explicitly set a default, it will be the first one installed.

所以你可以继续简单地使用 bash.exe

So you can continue to simply use bash.exe

这篇关于Windows 上的 Ubuntu 作为 VS Code 终端 - 可执行路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆