Here’s a handy cheat sheet for running updates on an Ubuntu server from the terminal. I always run automatic updates on my server (mainly because they aren’t business critical), I would personally rather have a fully patched system and have the odd few minutes of downtime.

Manual updates

Let’s start with the basics this all-in-one command that fetches & updates any available updates.

sudo apt-get update && sudo apt-get upgrade

To run medium disto updates and force updates that don’t install using the previous command to run, use this.

sudo apt-get dist-upgrade

For large releases, use this command to do a complete system…

As the title suggests, this is a very specific combination of tools, but I though it was worth sharing as it was difficult to find the right tools and the audience for running Ubuntu 64bit on the ARM based Rasberry Pi 4 is only going to grow larger as development improves.

I’ve been running Pi Hole network ad blocker on my home network, but I was frustrated by the fact Pi Hole would only show device IPs rather than names because my network DHCP is running from Unifi, rather from PiHole.

Image for post
Image for post

Fortunately, there is a way to add custom names to a containers Hosts file using variables through the create/run commands. If you add one line for each device, with the name and IP address, the PiHole admin page will then show the correct names listed.

 — add-host=”" \

This only works if your devices have static IP addresses, but remains persistent even with Watchtower refreshing the container.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store