|
|
希望系统启动时自动执行/usr/local/abc/bin下的命令,在/etc/profile加入,如下:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/abc/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/abc/bin"
fi
现在的问题是每次启动执行都要source /etc/profile一下才行,这太麻烦了。
google了一下,说可以在终端中更改为"以登录Shell方式运行命令",就可以了。这确实是可以了。
问题是如果每个用户都要更改太麻烦了,有没有更改系统配置文件就能直接解决的方法?
谢谢! |
|