First get latest postgresql info and install

sudo sh -c "echo 'deb $(lsb_release --codename | cut -f2)-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib libpq-dev

After this is done you can setup your user in psql:

# create psql superuser with current username
sudo -u postgres createuser --superuser $USER
sudo -u postgres psql

In the psql prompt set the password for the new user:

\password your-username

create a db with the name of the current user:

sudo -u postgres createdb $USER

Now you can connect to the database using just "psql" instead of having to type "psql postgres"

Related External Links: