\\?

Help (list meta-commands)

\\l

List databases

If your Postgres is before v16 it won’t have this command. Instead use:

SELECT datname FROM pg_database;

\\c <DB_NAME>

Short for \\connect. Use this to connect to a specified database.

\\dt

List tables