I think there are multiple things one could do to achieve this, but am uncertain which way to go:
- if you use
systemd
create a systemd service I guess? How to create systemd service that runs a (python) script on startup? - some files similar to
.bashrc
always run on system startup/boot?; use this if you are less fancy / have no systemd
meta: I know such questions have been asked before on stackoverflow; but lets bring them to fediverse as well (I hate stackoverflow web-design, google pop-ups, and javascript). I noticed there are always multiple ways to do such things in Linux. I think some options are very popular, while others go unmentioned (by LLMs for example). Also on different linux distributions there are different options available as far as I understand.