debian10 开机运行脚本

好像Debian10装好过后都没有/etc/rc.local文件了?

没有那就手动建立一个不就好了...直接sudo vi /etc/rc.local, 然后导入下面的内容

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# 在这里放你需要开机运行的脚本
exit 0

然后sudo chmod +x /etc/rc.local, 完成

发表评论

您的电子邮箱地址不会被公开。