Confessions and Confusions of a Freelance Fullstacker.

Ashok Mannolu Arunachalam, PostgresLinuxPop!_OS

How to install postgres client in linux

Postgres client is handy for a lot of operations you could do against a postgres db, be it local or remote.

Let's see how we can install one for linux.

Installing postgres client

$ sudo apt-get install postgresql-client

This installs psql bin with other utilities such as, pg_dump.

Verifying the installation

$ psql --version
$ psql (PostgreSQL) 12.5 (Ubuntu 12.5-0ubuntu0.20.10.1)

Connecting to a database

$ psql -h -U ashkeys -d ashkeys

In the above statement, we are trying to make a connection to the database named ashkeys, under the username ashkeys, against the host