# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
umask 022
我在做交叉编译,其中有一步这么做:(我没放到profile,我在profile.d下建了.sh)
报错:“fi”附近出现语法错误。
能讲讲代码是什么意思吗?我不懂pathmunge和PATH变量的关系
我在做交叉编译,网上有人这么做的:
我把这段话加在proflie文件内容的后面,然后
4、 执行 source /etc/profile命令,使新的环境变量生效
报错:bash:[1000:找不到命令
是不是要把添加的内容放到/etc/profile.d的.sh文件里?
但是为什么原来这样就不对呢?