Guides
PostgreSQL on Ubuntu

[2 min installs] PostgreSQL on Ubuntu

Author's avatar
Jan Tovarys
Updated on August 29, 2022

Here is how to install PostgreSQL on Ubuntu 20.04 in under 2 minutes:

Step 1 - Update the package list on your system

The first step is to update the package list on your system before proceeding to actual installation:

 
sudo apt update -y

apt update downloads the package lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.

Step 2 - Install PostgreSQL packages, CLI, and additional features

Execute the following command to install PostgreSQL packages, CLI and additional features:

 
sudo apt install -y postgresql postgresql-contrib postgresql-client

That's it

You have successfully installed PostgreSQL on your Ubuntu system. To ensure everything went as planned, you can execute the following command that will run the PostgreSQL server.

 
sudo dpkg --status postgresql
Author's avatar
Article by
Jan Tovarys
Check Uptime, Ping, Ports, SSL and more.
Get Slack, SMS and phone incident alerts.
Easy on-call duty scheduling.
Create free status page on your domain.
Got an article suggestion? Let us know
Next article
[2 min installs] MongoDB on Ubuntu
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.