How to install PostgreSQL on Linux Mint

In this article, we will see how to install PostgreSQL on Linux Mint step by step.

Install PostgreSQL on Linux Mint

1. First we have to update the packages index by running below command.

sudo apt-get update

How to install PostgreSQL on Linux Mint

2. Install PostgreSQL using below command on Linux mint.

sudo apt-get postgresql postgresql-contrib

Type Y and hit enter.

Post PostgreSQL installation steps on Linu Mint

1. Lets verify the PostgreSQL status on Linux mint.

sudo systemctl status postgresql

2. Now enable the PostgreSQL service to restart whenever Linux restarts.

sudo systemctl enable postgresql

3. Let’s connect to PostgreSQL using below commands

sudo su - postgres psql

4. Now change the password of user postgres.

alter user postgres with password 'admin@123';

For the same watch below video: