sudo apt install -y postgresql-client
-d specifies the name of the database to connect to. Use postgres (the name of the default maintenance database) if this name is not kownn: $ psql -h localhost -p 5432 -U admin -d postgres
\l. $ psql psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?