How to get Postgres database name at Linux terminal I need to connect to a single postgres database but I dont know the name of the database. How can I list names of available databases from the Linux terminal ?
You can use:

psql -l


This requires a login but you can use the same credentials as you would for connecting to the target database