Client installation

If you have a PostgreSQL server already installed and you need to interact with it, then you need to install the posttgresql-client software package. In order to do so, open a terminal and execute the following command:

sudo apt-get install PostgreSQL-client-10

With the installation of postgrsql-client-10, several tools are installed including the PostgreSQL interactive terminal (psql), which is a very powerful interactive frontend tool for PostgreSQL. To see the full list of installed programs, one can browse the installation directory. Note that the installation path might vary depending on the installed PostgreSQL version and also depending on the operating system:

ls /usr/lib/PostgreSQL/10/bin/clusterdb createdb createuser ...

Get Learning PostgreSQL 10 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.