Marco Nie - linux https://blog.niekun.net/tag/linux/ zh-CN Tue, 15 Oct 2019 14:23:00 +0800 Tue, 15 Oct 2019 14:23:00 +0800 Linux 设置开机自启动 python/bash 脚本 https://blog.niekun.net/archives/424.html https://blog.niekun.net/archives/424.html Tue, 15 Oct 2019 14:23:00 +0800 admin 打开 rc.local 文件:

vim  /etc/init.d/rc.local

在 rc.local 后加入启动命令:

sudo python /your/path/script.py &

&符号为让脚本后台运行,不在命令行显示结果.

]]>
0 https://blog.niekun.net/archives/424.html#comments https://blog.niekun.net/feed/tag/linux/archives/424.html