macos – 主目录中的.bashrc是否应自动加载?
发布时间:2020-12-15 22:32:01 所属栏目:安全 来源:网络整理
导读:我在我的.bashrc文件中添加了 scala,但是当我关闭我的mac并将其重新打开时它没有找到它.当我做 source ~/.bashrc 一切都恢复正常了.我会说问题一般是整个文件,但问题是,我还有其他的东西在之前工作得很好,但问题是scala持续存在.有谁知道这是为什么并解释我
我在我的.bashrc文件中添加了
scala,但是当我关闭我的mac并将其重新打开时它没有找到它.当我做
source ~/.bashrc 一切都恢复正常了.我会说问题一般是整个文件,但问题是,我还有其他的东西在之前工作得很好,但问题是scala持续存在.有谁知道这是为什么并解释我为什么会遇到这个问题?这是我的.bashrc文件中的内容,它正确运行rvm和mysql,但不是scala: PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting export PATH="/usr/local/mysql/bin:$PATH" export PATH="/Users/Zeroe/scala-2.9.1-1/bin:$PATH" 解决方法
你的shell可能是一个登录shell,在这种情况下,bash将按顺序读取各种配置文件:
> / etc / profile 通常从其中一个文件中获取?/ .bashrc,这样您也可以获得相同的登录shell配置. 这是我的?/ .profile包含的内容: # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1),if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins,install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi export LANGUAGE="en_US:en" export LC_MESSAGES="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LC_COLLATE="en_US.UTF-8" (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |