PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development. This tutorial will show you how to install the latest version of PostgreSQL on Ubuntu Linux 20.04.
Install PostgreSQL on Ubuntu Linux 20.04
PostgreSQL is available in Ubuntu’s repositories and can be installed by running the following commands.
sudo apt update
sudo apt install -y postgresql
However, after running psql -V psql you will notice the installed version is not the latest. As of writing, the Ubuntu 20.04 repository contains PostgreSQL 12.9 when the latest version is 14.1.
How to install the latest version of PostgreSQL on Ubuntu
We can install the latest version of PostgreSQL from the official PostgreSQL repository by following the steps below.