Donalist 2021-09-08 16:24
浏览 22
已结题

/etc/profile不生效shellsource

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 i
fi

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 9月16日
    • 创建了问题 9月8日