/etc/profile 环境变量生效问题
Tofloor
poster avatar
sa8821
deepin
2017-08-08 22:20
Author
设置了环境变量后  ,使用source /etc/profile生效后,每次关闭终端后,都需要重新输入source /etc/profile命令使环境变量生效,有这么坑的?
Reply Favorite View the author
All Replies
avatar
sa8821
deepin
2017-08-08 22:21
#1
这么坑的bug,谁还想用deepin,我艹,这特么简直想死
Reply View the author
avatar
Feng Yu
deepin
2017-08-09 00:17
#2
本帖最后由 abcfy2 于 2017-8-8 16:40 编辑

这个锅深度不背。而且你也不应该去动/etc/下的配置

TL;TD;
修改~/.bashrc

详细解释: http://www.linuxfromscratch.org/ ... ostlfs/profile.html

以及bash/zsh启动加载配置文件的顺序: https://shreevatsa.wordpress.com ... r-bashrc-zshrc-etc/。

图形界面下启动的虚拟终端是以非登录模式启动的,不加载/etc/profile文件。
其他参考问答: https://askubuntu.com/questions/ ... ile-d-being-ignored
Reply View the author
avatar
yaoshuo
deepin
2018-05-31 01:10
#3
https://bbs.deepin.org/post/143895
这么坑的bug,谁还想用deepin,我艹,这特么简直想死

白痴,这个都闹不明白,别玩linux啦
Reply View the author