LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 990|回复: 3

请教以下几个脚本文件的执行时机?

[复制链接]
发表于 2005-9-23 09:49:26 | 显示全部楼层 |阅读模式
/etc/rc.d/rc.sysinit
/etc/rc.d/rc.local
/etc/bashrc
/etc/profile
~/.bashrc
~/.bash_profile

请问这几个脚本文件都是在什么时机才会被执行?
发表于 2005-9-23 10:13:31 | 显示全部楼层
/etc/rc.d/rc.sysinit
from initab

/etc/rc.d/rc.local
no this script for LFS

/etc/bashrc
/etc/profile
~/.bashrc
~/.bash_profile
see http://www.linuxfromscratch.org/ ... ostlfs/profile.html
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-23 14:50:29 | 显示全部楼层
明白了,多谢!
回复 支持 反对

使用道具 举报

发表于 2005-9-24 17:14:57 | 显示全部楼层
另外,如果你想用 rc.local :


  1. touch /etc/rc.d/rc.local
  2. chmod +x /etc/rc.d/rc.local
  3. ln -sf /etc/rc.d/rc.local /etc/rc.d/rc1.d/S999rc.local &&
  4. ln -sf /etc/rc.d/rc.local /etc/rc.d/rc2.d/S999rc.local &&
  5. ln -sf /etc/rc.d/rc.local /etc/rc.d/rc3.d/S999rc.local &&
  6. ln -sf /etc/rc.d/rc.local /etc/rc.d/rc4.d/S999rc.local &&
  7. ln -sf /etc/rc.d/rc.local /etc/rc.d/rc5.d/S999rc.local &&
  8. ln -sf /etc/rc.d/rc.local /etc/rc.d/rc6.d/S999rc.local
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表