英文:
Running a python script from startup. (Windows and RPI os)
问题
我有一些Python脚本,我想在系统启动时启动它们。如何做到这一点?通过启动应用程序吗?我需要将脚本导出为exe,然后将其添加到启动应用程序中吗?树莓派呢?或者其他Linux系统呢?(关于这个问题有一些帖子,但没有一个完全回答我的问题。)
英文:
I have some Python scripts, and I want them to be started at system startup.
How can I do this?
By startup apps?
Do I need to export the script as an exe and then add it to the startup applications?
What about the raspberry pi?
Or another Linux?
(There are some posts about this, but none of them answer exactly my question)
答案1
得分: 1
将要运行的命令添加到文件 /etc/rc.local
中,它将在启动时运行。
英文:
As for the rpios, just add the command you want to run at startup to the file /etc/rc.local
. It will be run on startup.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论