SELECT datname FROM pg_database WHERE datistemplate = false;
Not my code, it came from http://dba.stackexchange.com/questions/1285/how-do-i-list-all-databases-and-tables-with-psql-command-line-tool
] and took me about 30 seconds to find with google.
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
In future, please try to do at least basic research yourself, and not waste your time or ours.