Raspberry Pi

Secure Raspberry Pi by Enabling Automatic Software Updates

The Raspberry Pi is a Linux-based system that helps users install different software. Every application you install on your Raspberry Pi system may come up with a major update that helps improve the security of the software and enhances its performance. Though updating the Raspberry Pi system with the “update” and “upgrade” command is helpful that checks for the software update and upgrade it accordingly. However, automating the task of the update process is beneficial since it helps secure your Raspberry Pi system even if you forgot to run the “update” commands on your system.

In this article, you will see the process of securing the Raspberry Pi system by enabling automatic software updates.

Secure Raspberry Pi by Enabling Automatic Software Updates

The “unattended-upgrades” is a utility mostly used on the Linux system that helps users automate the process of packages on the system. The utility is already installed on most Linux system, including the Raspberry Pi and you can confirm it using the following command:

$ sudo apt install unattended-upgrades

To check whether the unattended-upgrades service on Raspberry Pi is active, you can apply the following command:

$ sudo systemctl is-active unattended-upgrades

To perform a dry run of package update using “unattended-upgrade”, you can use the following command:

$ sudo unattended-upgrade -d -v --dry-run

To enable unattended-upgrades on Raspberry Pi, you have to use the following command:

$ sudo dpkg-reconfigure --priority=low unattended-upgrades

Confirm with the “Yes” option to ensure unattended-upgrades automatically download and install stable updates on your Raspberry Pi system. It is better to reboot the system to make the changes to work on the Raspberry Pi system. Once it’s done, you can enjoy working on your Raspberry Pi system without worrying about updating the software.

Conclusion

The “unattended-upgrades” is a Linux-based utility that you can use on the Raspberry Pi OS to enable automatic package updates, making your system secure and protected. It’s already installed on the Raspberry Pi system; however, you should enable it using the above mentioned-guidelines to ensure packages are updated on the Raspberry Pi system.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.