On the latest Ubuntu long term support release (20.04) the LTR long term support version of qgis 3.10 was added. If you are a company looking for long term version of gqis installing qgis from the default ubuntu repositories might not be such a bad idea.
If however you want to install a more recent version of qgis (either latest release or a more up to date LTR version) or possibly are using an older ubuntu version you will need to install qgis from the official qgis repositories.
For smal teams / people happy doing software updated we recommend using the latest version (3.12.x) and this is what this quide will help you doing.
In order to follow these instructions we need to ensure the tools used in this installation tutorial are present we therefore need to install gnupg and apt-add-repository
sudo apt-get install gnupg software-properties-common
Next we install the QGIS Archive Automatic Signing Key to authenticate the qgis developers to host packages for you.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51F523511C7028C3
Add the repository for the Latesr release (3.12.x)
sudo add-apt-repository "deb https://qgis.org/ubuntu `lsb_release -c -s` main"
Update the repositories
sudo apt-get update
Verify that qgis will be installed from the new repository
sudo apt-cache policy qgis
Install qgis
sudo apt-get install qgis
These instructions will also work for debian if "ubuntu" is replaced by "debian" in the add-apt-repository command
sudo add-apt-repository "deb https://qgis.org/debian `lsb_release -c -s` main"
For installing the LTR version from our repositories replace "unbutu" by "ubunty-ltr"
sudo add-apt-repository "deb https://qgis.org/ubuntu-ltr `lsb_release -c -s` main"