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
psql bin with other utilities such as,
Verifying the installation
$ psql --version$ psql (PostgreSQL) 12.5 (Ubuntu 12.5-0ubuntu0.20.10.1)
Connecting to a database
$ psql -h ashokma.com -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