|
发表于 2007-12-13 22:59:18
|
显示全部楼层
Post by xlq;1795386
[color="Red"]login shell 也会读取.bashrc文件, "vim .bashrc"会发现 "if [ -f ~/.bashrc ]; then . ~/.bashrc fi",你可以在.bashrc文件中设一个变量,su 及 su - 后,看看能否显示此变量.
你也可用exit命令试, 如果是login shell,则会清屏. 或者试logout, non-login shell 的话不能使用. 这不见得,不同发行版的启动配置略有不同
一般是 login shell 读取 /etc/profile 或者 ~/.bash_profile,而 non-login shell 则透过 ~/.bashrc 去读入 /etc/bashrc |
|