Mainly used to record Java, DBMS, HDFS... related learning notes
问题 bashrc 新开终端不生效问题
每次终端都需要 source ~/.bashrc
解决
没有~/.bash_profile 文件就新建一个
vim ~/.bash_profile
# 加载.bashrc文件
if test -f .bashrc ; then
source .bashrc
fi
修改/etc/profile
# 修改环境变量配置文件
vim /etc/profile
# 生效
source /etc/profile
修改~/.bash_profile
# 跳到指定用户
su username
# 修改单个用户的环境变量配置
vim ~/etc/.bash_profile
# 生效
source /etc/.bash_profile