How to List Databases Using the psql command line tool
To list all databases in Postgres, use the \l command in the psql command-line interface. This will display a table with the database name, owner, encoding, and collation for each database on the server. Alternatively, use the \du or \db commands to list databases that you have access to or to see detailed information about a specific database.
Matthew Rathbone /
January 15, 2023