linux设置系统变量

[ test]# export AUTHOR=brady
[ test]# echo $AUTHOR
brady
[ test]# env

查看命令为env

[ test]# echo $PATH
/usr/local/miniconda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin
[ test]# 
linux 默认可执行文件查找目录

[ test]# PATH="$PATH":/root
[ test]# echo $PATH
/usr/local/miniconda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin:/root/bin:/root
[ test]# 

临时生效

vim /etc/profile
export PATH="$PATH":/root

相关推荐