首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >在Windows上的特定或当前文件夹中启动WSL Ubuntu

在Windows上的特定或当前文件夹中启动WSL Ubuntu
EN

Stack Overflow用户
提问于 2018-03-28 04:45:04
回答 11查看 59.2K关注 0票数 84

在他的开发机器上从商店安装Linux和Ubuntu子系统时,我可以通过以下方式切换(或启动)到Ubuntu shell

但是,默认情况下,Ubuntu在/home/techsupp文件夹中启动。是否有可能强迫它在与我使用的Ubuntu命令相同的文件夹中启动?

所以在我的例子中我应该在

代码语言:javascript
代码运行次数:0
运行
复制
/mnt/h

谢谢。

我已经尝试过的:

代码语言:javascript
代码运行次数:0
运行
复制
H:\>ubuntu help
Launches or configures a linux distribution.

Usage:
    <no args>
      - Launches the distro's default behavior. By default, this launches your default shell.

    run <command line>
      - Run the given command line in that distro, using the default configuration.
      - Everything after `run ` is passed to the linux LaunchProcess call.

    config [setting [value]]
      - Configure certain settings for this distro.
      - Settings are any of the following (by default)
        - `--default-user <username>`: Set the default user for this distro to <username>

    clean
      - Uninstalls the distro. The appx remains on your machine. This can be
        useful for "factory resetting" your instance. This removes the linux
        filesystem from the disk, but not the app from your PC, so you don't
        need to redownload the entire tar.gz again.

    help
      - Print this usage message.

我还在uservoice:code=8a8bc624c72a8336565fcd6d5737d712上发现了这个请求

请投赞成票。

EN

回答 11

Stack Overflow用户

回答已采纳

发布于 2019-06-12 16:56:02

我在Windows10HomewithMayUpdate,并安装了Ubuntu18.04为WSL,我可以打开控制台在任何文件夹中使用Shift +右键单击并选择open选项

票数 77
EN

Stack Overflow用户

发布于 2020-04-12 17:11:35

如果您在Task中签入资源管理器“这里”选项是如何打开wsl的,您可以看到有一个"--cd“选项。

票数 43
EN

Stack Overflow用户

发布于 2019-04-09 11:21:30

代码语言:javascript
代码运行次数:0
运行
复制
ubuntu run

跑 在当前工作目录中运行提供的命令行。如果没有 提供更高级的命令行,启动默认的shell。

据我所知,它的效果与运行ubuntu相同,只是它是在当前目录中启动的。

该命令甚至可以在资源管理器中以右键单击“打开此处”命令的方式工作。从这篇文章调适

  • RegEdit到HKEY_CLASSES_ROOT\Directory\Background\shell并创建一个新键
  • 编辑(Default)到“在这里打开Ubuntu”或类似的。
  • 添加名为command的密钥
  • (Default)编辑为ubuntu run

现在,您有一个功能“打开Ubuntu在这里”右键单击菜单中的资源管理器。

wsl的问题是wsl窗口没有Ubuntu图标,即使它启动了Ubuntu发行版。

票数 37
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49526259

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档