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

标签 windows windows-subsystem-for-linux

当在他的开发机器上安装 Linux 和 Ubuntu 的子系统时,我可以简单地切换(或启动)到 Ubuntu shell

enter image description here

但 Ubuntu shell 默认在 /home/techsupp 文件夹中启动。是否可以强制它在与我使用 Ubuntu 命令的文件夹相同的文件夹中启动?

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

/mnt/h

谢谢。

我已经尝试过的:

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 上发现了这个请求:https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/13421103-let-us-right-click-open-bash-here-from-explorer?tracking_code=8a8bc624c72a8336565fcd6d5737d712

请投票给它。

最佳答案

我在装有 May Update 的 Windows 10 家庭版上安装了适用于 WSL 的 Ubuntu 18.04,我可以通过 Shift + 右键单击​​ 在任何文件夹中打开控制台并选择 打开 Linux shell这里选项

关于windows - 在 Windows 上的特定或当前文件夹中启动 WSL Ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49526259/

相关文章:

windows - 如何使用 127.0.0.1 从 Windows 主机访问在 WSL2 中运行的服务?

bash - 从 WSL session 内部关闭或重新启动 WSL session

windows - 有没有办法告诉程序使用的是什么语言?

windows - 批处理文件 (windows cmd.exe) 测试文件是否为链接

java - 需要帮助在 Windows(Java、NetBeans)上的 Tomcat 中为 log4j 运行定制的 glass/jar

ubuntu - 如何在 Windows 10 上访问 Ubuntu 子系统中的项目

windows-subsystem-for-linux - WSL 停止工作并出现错误 : 0x80070003

windows - 类型或命名空间名称 'MD5CryptoServiceProvider' 不存在

windows - Windows 7 中 Mocha 的代码覆盖率

docker -/mnt/d 上的 WSL2 Docker(撰写)非常慢