I'm just starting with Postgres.
This is a fresh install of Postgres 9.5 on Ubuntu 14.04 LTS. I used the apt repo from: http://www.postgresql.org/download/linux/ubuntu/
The intro page http://www.postgresql.org/docs/9.5/static/tutorial-createdb.html says that "-U" should work. It doesn't:
chris@blue:~$ psql -U postgres
psql: FATAL: Peer authentication failed for user "postgres"
Yet, if I "su" to postgres, all is well:
chris@blue:~$ sudo su - postgres
postgres@blue:~$ psql
psql (9.5.2)
Type "help" for help.
postgres=#
What have I misunderstood?