代码改变世界

linux 使用 rc.local 实现自启动

2020-07-14 17:31  极光の地  阅读(3412)  评论(0编辑  收藏  举报

1. 编辑文件,在里面添加需要的命令 vim /etc/rc.loal 

 

 

 

如图所示,我添加了两条命令。

开机后会在 root 目录创建 test_rc.local 文件,和执行 ngrok-server 脚本

2. 赋予执行权限 chmod +x /etc/rc.local 

3. 重启系统 reboot