

Third, update the package list: $ sudo apt-get update Code language: Shell Session ( shell )įinally, install the latest version of PostgreSQL: $ sudo apt-get install postgresql Code language: Shell Session ( shell ) Second, import the repository signing key: $ wget -quiet -O - | sudo apt-key add - Code language: Shell Session ( shell ) You need to execute them one by oneįirst, execute the following command to create the file repository configuration: $ sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt//pgdg.list' Code language: Shell Session ( shell ) Once visiting the PostgreSQL download for Ubuntu page, you find the script that allows you to install PostgreSQL on Ubuntu. In this tutorial, we’ll show you how to install PostgreSQL on Ubuntu 20.04. To download and install PostgreSQL on Linux, you visit the download page and select your Linux distribution.

It is recommended that you install PostgreSQL this way since it ensures a proper integration with the operating system including automatic patching and other update management functionality. Most Linux platforms such as Debian, Red Hat / CentOS, SUSE, and Ubuntu have PostgreSQL integrated with their package management. Summary: in this tutorial, you will learn how to download and install PostgreSQL on Linux.
