Connect to psql as a non postgres user
$ psql -d testdbname
- when the os user exists in the db and trusted authentication is enabled.
# create database db2;
- create a database
# drop database db2;
- drop a database
# \c[onnect] db2
- connect to a database
# \l[ist]
- list all databases
# \l+
- list all databases with extra details, including size