如何在 Windows 10 开发者模式下的 Ubuntu 上读取 sh 文件 [英] how to read sh files on Ubuntu built in Windows 10 developer mode

查看:38
本文介绍了如何在 Windows 10 开发者模式下的 Ubuntu 上读取 sh 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 10 上的 Ubuntu 上使用 bash 打开我下载的 sh 文件.但是当我将 sh 文件放在 Ubuntu 的目录中时,我看不到它们.我可以在 Windows 目录中看到它们和我的其他文件,但在 Ubuntu 中看不到.

I use bash on Ubuntu on Windows 10 to open a sh file I downloaded. But when I put the sh files in my directory in Ubuntu I can't see them. I can see them and my other files in Windows directory but not in Ubuntu.

Windows 10 上的 Ubuntu 上的 Bash 是 Windows 10 中的内置功能.它可以在开发人员模式下使用.它不是 CMD 或命令提示符或其他任何东西.

Bash on Ubuntu on Windows 10 is a built in feature in Windows 10. It can be used in developer mode. It is not CMD or command prompt or whatsoever.

推荐答案

你在 bash 中的主目录是

You home directory in bash is

c:\Users\<Windows User>\AppData\Local\lxss\home\<linux_username>\

更新:

抱歉,我误读了您的问题,当 Windows 保存这些文件时,您在从 bash 看到这些文件时遇到问题.我不确定这对主文件夹到底是如何工作的,但是您可以使用/mnt/

sorry, I misread your question, you have a problem seeing these files from bash, when they are saved by Windows. I'm not sure how exactly this works regarding home folder, but you can access any Windows files from bash using filesystem in /mnt/

所以上面将是 /mnt/c/Users//AppData/....

更新 2:

这里有关于这个问题的更多信息 - https://superuser.com/questions/1083962/windows-linux-subsystem-accessing-files-outside-of-ubuntu基本上,确认我上面所说的 - 你必须使用/mnt/

Here is more information about the problem - https://superuser.com/questions/1083962/windows-linux-subsystem-accessing-files-outside-of-ubuntu Basically, confirming what I said above - you have to use /mnt/

这篇关于如何在 Windows 10 开发者模式下的 Ubuntu 上读取 sh 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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