The instructions on the QGIS download site are not as intuitive as I'd like, but they do work when you know the command syntax:
First, what version of Debian Linux (Ubuntu / Mint) are you running?
The Ubuntu Codename of your APT repository will depend on the version of the OS and which version of QGIS you can run.
QGIS 3.10/14 will run on Ubuntu 20.04 (focal) and Linux Mint 20 (focal) and above.
You can run this command to get your DISTRIB_CODENAME:
cat /etc/upstream-release/lsb-release
Add links to QGIS repositories
# Replace 'codename' with your ubuntu version codename:
sudo add-apt-repository "deb https://qgis.org/debian codename main"
Add keys:
wget -qO - https://qgis.org/downloads/qgis-2020.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import
sudo chmod a+r /etc/apt/trusted.gpg.d/qgis-archive.gpg
Install QGIS
sudo apt-get update && sudo apt-get install qgis python-qgis
Notes:
- Keys last updated 08/12/2020
- Please leave a comment if you notice they need updating again, and I will update this answer
- The original QGIS instruction details are here
47765B75with one that appeared when attempting thesudo apt-get update [..]the first time – Jur_ Mar 15 '16 at 09:06http://qgis.org/ubuntugis. – Jur_ Mar 15 '16 at 09:15wgetlines and beyond? The rest seems like more-or-less standard Ubuntu-ese, but that gets a bit abstruse. – MichaelChirico Jun 20 '16 at 16:08trustyfor my old Linux Mint laptop, but everything worked fine otherwise. – Eric Duminil May 10 '17 at 21:35zesty, too now, Ubuntu 17.04 – BiggCrazy Jul 25 '17 at 07:38wgetreturns a 403 now, you can use your browser to download the key or use curl:curl https://qgis.org/downloads/qgis-2019.gpg.key | gpg --import– Paul J Apr 22 '20 at 16:54