#Ubuntu没有开机自启文件,可以在/etc/目录下面创建一个rc.local文件,并且给他一个可执行权限就行了
#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.
cd /root/
nohup /root/test.sh &
保存之后,不要忘记给 rc.local 添加可执行权限
chmod +x /etc/rc.local
转载请注明:exchen's blog » 解决ubuntu没有rc.local文件
标签:文件,script,自启,rc,开机,local From: https://www.cnblogs.com/qiangfenger/p/16588127.html