sudo su - postgres
psql

Make sure you have these lines in your pg_hba.conf:

local      all             all                   md5
local      all             postgres              md5

Some useful commands:

\l              # list all databases
\c DATABASE     # connect to a database
\dt             # show tables inside a database, press q to quit
\d+ TABLE       # display columns/field names of a table
\q              # quit psql console

Error log file location:

/var/log/postgresql