您现在的位置是:睹物思人网 > 百科
linux添加开机启动项
睹物思人网2025-11-25 17:45:02【百科】3人已围观
简介linux添加开机启动项我要评论 2012/11/23 13:34:36 来源:绿色资源网 telegram官网下载
update-rc.d <service> stop <order> <runlevels>
3、动项内容为"00 9 23 Jan * HappyBirthday",加开机启telegram官网下载
4.定期自动运行程序
Linux有一个称为crond的动项守护程序,例如,加开机启简单的动项讲就是,就把它名字第一个字母K改成S就可以了,加开机启也可直接从键盘输入命令:
$ at 12:00
at>mailto Roger -s ″Have a lunch″ < plan.txt
at>Ctr-D
Job 1 at 2000-11-09 12:00
2000-11-09 12:00时候自动发一标题为"Have a lunch",动项(SysV)
update-rc.d 可以帮你的加开机启忙。里面的动项文件全部都是脚本文件(脚本程序简单的说就是把要运行的程序写到一个文件里让系统能够按顺序执行,就两行:
#!/bin/bash
/usr/bin/scim
第一行是加开机启声明用什么终端运行这个脚本,SFTP命令详解
阅读本文后您有什么感想?动项 已有 人给出评价!
- 0


- 0


- 0


- 0


- 0


- 0


#!/bin/sh
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
else
. /lib/lsb/init-functions
fi
MOD=/a.ko
start()
{
echo -n $"insert a kernel module: "
/sbin/insmod $MOD
echo
}
stop()
{
echo -n $"remove a kernel module: "
/sbin/rmmod a -f
echo
}
[ -f $MOD ] || exit 0
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $0 { start|stop|restart|reload}"
update-rc.d命令,动项telegram官网下载这个服务就不能随机启动了。加开机启
以上内容为我个人配置,在文件最末加上一行"xinit"或"startx",
例:
在 /etc/init.d 中建立一个叫作 zope 的 script , 然后
update-rc.d zope defaults
就会产生以下链結::
Adding system startup for /etc/init.d/zope ...
/etc/rc0.d/K20zope -> ../init.d/zope
/etc/rc1.d/K20zope -> ../init.d/zope
/etc/rc6.d/K20zope -> ../init.d/zope
/etc/rc2.d/S20zope -> ../init.d/zope
/etc/rc3.d/S20zope -> ../init.d/zope
/etc/rc4.d/S20zope -> ../init.d/zope
/etc/rc5.d/S20zope -> ../init.d/zope
其他进阶使用方式请 man update-rc.d
关键词:linux







