Quantcast
Viewing latest article 8
Browse Latest Browse All 25

Automating System Updates with Unattended-Upgrades on Ubuntu

The post Automating System Updates with Unattended-Upgrades on Ubuntu appeared first on Patrick Domingues.

Maintaining an up-to-date system is crucial for security and stability. On Debian and Ubuntu systems, the unattended-upgrades package simplifies this process by automating the installation of security updates and essential package upgrades. This guide provides a comprehensive overview of installing, configuring, and managing unattended-upgrades to ensure your system remains secure with minimal manual intervention.

Image may be NSFW.
Clik here to view.
Ubuntu 22.04

To automate the installation and configuration of Unattended-Upgrades on Ubuntu 24.04 you can create a shell script that performs the following tasks:

  1. Install the Unattended-Upgrades Package: Ensure the package is installed.
  2. Enable Automatic Updates: Configure the system to perform daily package list updates and unattended upgrades.
  3. Configure Unattended-Upgrades: Modify settings to include regular package updates and set up email notifications.

Here’s a script that accomplishes these steps:

#!/bin/bash

# Update package lists and install unattended-upgrades
sudo apt update && sudo apt install -y unattended-upgrades

# Enable automatic updates
sudo tee /etc/apt/apt.conf.d/20auto-upgrades > /dev/null 

Read the rest

The post Automating System Updates with Unattended-Upgrades on Ubuntu appeared first on Patrick Domingues.

Viewing latest article 8
Browse Latest Browse All 25

Trending Articles