QGIS is a cross-platform free and open-source desktop geographic information system (GIS) application. Although being cross-platform, level of official support varies from one platform to another. For the highest level of official support, I will recommend Ubuntu for building QGIS application environment.
I have modified the installation process a bit, creating separate sources list file and trusted signing key file, to better fit the design philosophy of APT.
Import QGIS Archive Automatic Signing Key
curl -fsSL https://qgis.org/downloads/qgis-2020.gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/qgis-archive.gpg add -
On Ubuntu 20.04 LTS, Focal Fossa
/etc/apt/sources.list.d/qgis-ubuntu-focal.list with following content.
deb https://qgis.org/ubuntu/ focal main deb-src https://qgis.org/ubuntu/ focal main
On Ubuntu 18.04 LTS, Bionic Beaver
/etc/apt/sources.list.d/qgis-ubuntu-bionic.list with following content.
deb https://qgis.org/ubuntu/ bionic main deb-src https://qgis.org/ubuntu/ bionic main
On Ubuntu 16.04 LTS, Xenial Xerus (Obsolete)
I want my GDAL to support WMTS, which is not implemented before GDAL 2.1, so I am going to install GDAL from UbuntuGIS repository. With this considered, I’ll just point the QGIS APT source to Latest Release with UbuntuGIS dependencies to get the most out of everything.
Setup QGIS Suite
/etc/apt/sources.list.d/qgis-ubuntugis-xenial.list with following content.
deb https://qgis.org/ubuntugis/ xenial main deb-src https://qgis.org/ubuntugis/ xenial main
Setup UbuntuGIS Suite
Where newer version of GDAL resides.
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt update sudo apt install qgis