在rc.local
脚本中添加开机自启动程序
1、编辑文件 /etc/rc.local
vim /ect/rc.local
2、编辑完/etc/rc.local需要添加执行权限,否则调用失败
chmod +x /ect/rc.d/rc.local
3、/ect/rc.local
和/ect/rc.d/rc.local
是软链接关系
[root@localhost ~]# ll /etc/rc.local
lrwxrwxrwx. 1 root root 13 9月 29 2022 /etc/rc.local -> rc.d/rc.local
[root@localhost ~]# ll /etc/rc.d/rc.local
-rwxr-xr-x. 1 root root 524 10月 24 2022 /etc/rc.d/rc.local
4、自定义自启动配置文件:
downey@ubuntu:~$ cat /etc/rc.local
./usr/bin/diodon &
exit 0
标签:etc,root,linux,开机,ect,rc,自启动,local
From: https://www.cnblogs.com/muzlei/p/17372058.html