如何让linux启动时自动执行命令
1个回答
展开全部
编辑/etc/rc.d/rc.local
加入要执行的命令。
如:
[root@rhel5 rc.d]# cat rc.local
#!/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
vncserver :1
加入要执行的命令。
如:
[root@rhel5 rc.d]# cat rc.local
#!/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
vncserver :1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询