~/.bash_profile 位于适用于 Linux 的 Windows 子系统中的什么位置?

Jor*_*oza 10 bash windows-subsystem-for-linux

尝试~/.bash_profile从 Linux 的 Windows 子系统中的 Ubuntu Xenial (16.04)访问时,出现以下错误:

-bash: /home/<username>/.bash_profile: No such file or directory
Run Code Online (Sandbox Code Playgroud)

它位于何处以及如何编辑它?

谢谢!

jpe*_*ezz 10

从 bash 的手册页:

默认情况下,它首先从文件 > /etc/profile 中读取并执行命令,如果该文件存在的话。读取该文件后,它会按顺序查找 ~/.bash_profile、~/.bash_login 和 ~/.profile,然后从第一个存在且可读的命令中读取和执行命令。

所以它存在于你的主目录中,如果你创建它并使其可读。