linux添加到路径
export PATH=$PATH:/place/with/the/file
添加到路径到路径
FOR MAC:
1º - Open Finder
2º - Choose Go > Go to folder
3º - Go to ~/Library/
4º - Look for hidden files: Cmd + Shift + . (dot)
5º - Depending on the shell you use, the file can be .bash_profile, or .bashrc, or .zshrc, ...
6º - Open that file in the text editor
7º - Add the new path like: export PATH="$PATH:"User/new_path/..."
8º - Test in your command line if it worked: echo $PATH
如何导出路径
export AMBERHOME=/programs/amber18 # set of folders
export PATH=$AMBERHOME:$PATH #define the path
#better to add these in bashrc file
获取path env变量中的第一条路径
echo ${PATH%%:*}
如何在linux中添加目录到path
nano ~/.bashrc