当前位置: 技术问答>linux和unix
在Linux下怎样让程序已开机,就启动
来源: 互联网 发布时间:2015-08-28
本文导语: 如题 | 把启动命令放到/etc/rc.local里 | 好像在/etc/rc.d/init.d里也可以執行吧 kernel起來的時候似乎也去執行init.d里的shell | 在/etc/rc.local中添加你的程序 ./yourprogram 请注意路...
如题
|
把启动命令放到/etc/rc.local里
|
好像在/etc/rc.d/init.d里也可以執行吧
kernel起來的時候似乎也去執行init.d里的shell
kernel起來的時候似乎也去執行init.d里的shell
|
在/etc/rc.local中添加你的程序
./yourprogram
请注意路径
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
./yourProgram
./yourprogram
请注意路径
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
./yourProgram
|
在/etc/rc.d/rc3.d/
/etc/rc.d/rc5.d/
这两个地方也可以……就是文本模式和图像模式!
/etc/rc.d/rc5.d/
这两个地方也可以……就是文本模式和图像模式!