Here is a method to set up automatic updates on your Ubuntu server, avoiding the need to manually check and apply important security updates and patches.
Start by updating your package information:
sudo apt update
Next install unattended-upgrades
sudo apt install unattended-upgrades apt-listchanges bsd-mailx
Enable the unattended security updates with:
sudo dpkg-reconfigure -plow unattended-upgrades
Now to configure some settings for the automatic updates
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Ensure the following is set/edited:
Unattended-Upgrade::Mail "YOUREMAIL@email.com";
Unattended-Upgrade::Automatic-Reboot "true";
This ensures the email logs will be sent to and allow for automatic reboots.
Save and exit the file.
Next go to:
sudo nano /etc/apt/listchanges.conf
and set your email again like so:
email_address=YOUREMAIL@email.com
Save and exit the file.
You can verify that the automatic updates is working by running:
sudo unattended-upgrades --dry-run
Whenever new updates are downloaded and installed you will be emailed a log with details. Alternatively you can use
sudo tail -f /var/log/unattended-upgrades/unattended-upgrades.log
To check the logs.
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…