ubuntu设置开机自动运行自己的脚本或者一些命令

编辑/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 之后保存并退出...

2021-05-20 18:37:46 更新