- 添加变量
在目录 /etc/profile.d 中添加 xxxx.sh 文件
export V2_PROV_ConnectionStrings__DefaultRedis="127.0.0.1:6379,name=xxxx,password=,defaultDatabase=0"
使之生效命令
source /etc/profile.d/xxxx.sh
- 删除变量
将 xxxx.sh 文件对应删除,还需要通过命令移除对应系统已运行之变量
通过命令 export -n V2_PROV_ConnectionStrings__DefaultRedis ,或者通过命令 unset V2_PROV_ConnectionStrings__DefaultRedis
参考链接
https://www.cnblogs.com/lwlnice/p/18295623
https://www.linuxcool.com/source
https://www.linuxcool.com/export
https://www.linuxcool.com/unset