Debian 9 - Running a python script at boot

Note: Debian 9 is end-of-life, but the crontab @reboot technique shown here works on all modern Debian, Ubuntu, and Raspberry Pi OS releases. There are a number of ways that you can run a python or bash script at system start but I am about to show you possibly the easiest way, using crontab. First you need to make that your script is executable and can run unattended. Then you need to login as the user your wish to execute the script as and edit the crontab file: ...

February 21, 2019 · 1 min · Tom Cocking

How to Upgrade Python on Debian, Ubuntu and Kali Linux (and Set the Default Version Safely)

Updated October 2026: this page replaces six separate posts I wrote between 2019 and 2021 about upgrading Python on Debian 9 and 10, Ubuntu 19.10 and Kali, and switching the python command from 2.7 to 3. The old URLs redirect here. Everything in the first half was re-tested on 8 October 2026 in fresh Debian 12 and Ubuntu 22.04 containers. The original 2019 from-source walkthrough is kept at the end because it still works, with one important correction. ...

February 19, 2019 · 6 min · Tom Cocking