Mee*_*iya 24 linux windows bash .bash-profile windows-subsystem-for-linux
微软刚刚在其Windows 10周年纪念版中引入了一个Linux子系统.安装非常简单,但我找不到Windows上的bash文件.
它是如何工作的?~
在Windows 中引用了什么?哪里可以找到.bashrc
?
ncw*_*ncw 34
自Windows 10 Fall Creators Update以来,位置已更改为
C:\Users\USERNAME\AppData\Local\Packages\{DIST}\LocalState\rootfs\home\{LINUXUSER}\
Run Code Online (Sandbox Code Playgroud)
在哪里{DIST}
等于CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
.
只是想知道来自谷歌的人.
Bin*_*ump 25
对不起,误解,我检查谷歌,它将在C:\Users\USERNAME\AppData\Local\Lxss\home\USERNAME
.
我尝试了它的工作原理,在cmd中输入cd\ && dir *bashrc* /s
它会找到文件,在我的情况下我会看到该行,C:\Users\USERNAME\AppData\Local\Lxss\home\USERNAME
但是当我想用窗口浏览器导航它时它不起作用,但如果你复制粘贴它,它工程:-)
我在那里找到它:http://www.howtogeek.com/261383/how-to-access-your-ubuntu-bash-files-in-windows-and-your-windows-system-drive-in-bash/
考虑到您需要知道文件的位置,您可以使用该find
命令.默认情况下
,该命令的语法find {search-path} {file-names-to-search} {action-to-take}
是打印文件名.
因此,如果您正在查找.bashrc文件,您可以使用find / -name .bashrc
bash返回给您/home/yourusername/.bashrc
此外,如果你想访问你的主目录,你可以使用cd ~
希望我的答案将有所帮助:-)