如何让linux启动时自动执行命令

如题所述

编辑/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
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答