How to Install Postgresql 13 in Ubuntu?

How to Install Postgresql 13 in Ubuntu?

How to install PostgreSQL-13 in Ubuntu 20.04?

1

4 Answers

sudo sh -c 'echo "deb  $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

wget --quiet -O -  | sudo apt-key add -

sudo apt-get update

# Specify/replace the version number you want to install

sudo apt-get -y install postgresql-13
1

If the version included in your version of Ubuntu is not the one you want, you can use the PostgreSQL Apt Repository. This repository will integrate with your normal systems and patch management, and provide automatic updates for all supported versions of PostgreSQL throughout the support lifetime of PostgreSQL.

The PostgreSQL Apt Repository supports the current LTS versions of 18.04 & 16.04

on the following architectures: amd64 i386 ppc64el

While not fully supported, the packages often work on other non-LTS versions as well, by using the closest LTS version available. To use the apt repository, follow these steps:

Create the file /etc/apt/sources.list.d/pgdg.list and add a line for the repository

deb  YOUR_UBUNTU_DISTRIB_CODENAME_HERE-pgdg main

Import the repository signing key, and update the package lists

wget --quiet -O -  | sudo apt-key add -
sudo apt-get update

From

0

The latest version of postgresql-client and postgresql-11 in the Ubuntu 19.04 and 19.10 default repositories is version 11. To install these packages run:

sudo apt install postgresql-client postgresql-11

The latest version of postgresql-client and postgresql-XX in the Ubuntu 20.04 default repositories is version 12.

sudo apt install postgresql-client-12 postgresql-12

Open the terminal and paste:

sudo apt install postgresql-12

Then check the status:

sudo systemctl status postgresql
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.