ubuntu 在/etc/profile.d 下写了一个shell文件,切换用户不执行该文件,使用source 可以执行,/etc/profile相关语句如下
if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset ifi
收起
报告相同问题?