Install Postgres Database & pgAdmin4 on Ubuntu 20.04

Photo by Boitumelo Phetla on Unsplash
  • Go to the terminal and update system software packages
  • Install the package of PostgreSQL and it’s contrib files
  • Once the installation done check the status of postgresql


  • If status is active then go to next step and create database using below command
  • To connect the database
  • Now create user
  • Create database
  • Grant role to the users
  • To check whether connection is secure or not for this we need to check pg_hba.conf file
  • Once it is done now install pgadmin4
  • Now install pgadmin packages
  • After installation of pgadmin4 do server setup
  • Now play around queries

Thank you for reading .Give it try and share your feedback :)

Software Developer | Technical Writer