我可以在 Windows 10 上获取(新的)bash 来加载 .profile
Can I get (the new) bash on Windows 10 to load .profile
我在 Windows 10 上安装了 Linux 的新子系统(随 Windows 周年更新一起提供),并开始使用它。
我注意到启动 shell (ubuntu bash) 不会加载 .profile 或 .bash_profile,即使 .profile 文件存在。有修复吗?
(声望很高的人可以制作 windows-bash 标签吗?)
默认情况下,此 Ubuntu-on-windows 版本加载名为 .bashrc
.
的文件
您可以放置脚本或将以下行添加到 .bashrc
(如果不存在则创建 .bashrc
):
. ~/.profile
注意:如果 .bashrc
来自 .profile
,您可能需要将其注释掉以防止 bash 无限循环。
我在 Windows 10 上安装了 Linux 的新子系统(随 Windows 周年更新一起提供),并开始使用它。
我注意到启动 shell (ubuntu bash) 不会加载 .profile 或 .bash_profile,即使 .profile 文件存在。有修复吗?
(声望很高的人可以制作 windows-bash 标签吗?)
默认情况下,此 Ubuntu-on-windows 版本加载名为 .bashrc
.
您可以放置脚本或将以下行添加到 .bashrc
(如果不存在则创建 .bashrc
):
. ~/.profile
注意:如果 .bashrc
来自 .profile
,您可能需要将其注释掉以防止 bash 无限循环。