Linux设置环境变量PATH路径的两种方法

echo 'export dataPath=$HOME/data/pre' >> ~/.bash_profile
路径即刻生效:
. .bash_profile 或 source .bash_profile 或 exec bash --login

echo 'export dataPath=$HOME/data/pre' >> ~/.bashrc
. .bashrc

原文地址:https://www.cnblogs.com/bregman/p/6829429.html