B S*_*ven 60 bash .profile environment-variables bashrc source
刚刚安装了 Ubuntu 14.04.1 LTS。
根据.profile,
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash, if ~/.bash_profile or ~/.bash_login exists.
Run Code Online (Sandbox Code Playgroud)
没有 ~/.bash_profile 或 ~/.bash_login。
打开终端时似乎没有来源 .profile 。
mur*_*uru 50
.profile。bash,请参阅启动文件集。binin的文件夹$HOME,.profileUbuntu的默认设置会将其添加到您的PATH. 由于.profile是在登录时获取的(即使使用 GUI 登录),它应该是您PATH重新登录后启动的非登录 shell 的一部分。如果一个目录在 中出现两次也没有错PATH,有关详细信息,请参阅此 U&L 问题。小智 22
我发现我必须编辑默认配置文件。在终端中,单击 Preferences > Profiles > Edit > Command > Run command as login shell
之后,新终端将获取.profile脚本。