原帖由 4Aiur 于 2006-7-14 19:47 发表
看你使用的是什么shell了
用户主目录下的
.bash_profile
.bashrc
.cshrc
.tcshrc
都有可能
原帖由 miaoer 于 2006-7-14 18:38 发表
现在碰到个问题
SUSE linux 8.0 下面
有一个用户 abis
在 /etc/passwd中可以看到该用户abis的 home目录为 /home/abis
在/etc/profile的最前面添加 echo $HOME
当用该用户abis 登陆之后 可以看到 e ...
原帖由 4Aiur 于 2006-7-15 13:05 发表
看shell就知道顺序了
cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
...
原帖由 miaoer 于 2006-7-15 01:12 发表
使用的是bash
这些都是在/etc/profile之后执行的嘛?
原帖由 waker 于 2006-7-17 08:43 发表
HOME是内置变量,不是脚本产生的
原帖由 miaoer 于 2006-7-17 19:05 发表
是内置变量,但是也可以被更改啊
现在我的问题是 在/bin/login 从/etc/passwd读出该值并赋值给HOME, 到执行/etc/profile 之前
这个过程中有没有其他的 程序或者脚本会更改 HOME的值.
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |