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