sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql postgresql-contrib
ls /etc/postgresql/<version>/main/
here postgresql.conf is the configuration file for postgresql
service postgresql
service postgresql status
sudo su postgres
psql
\l
\du
ALTER USER postgres WITH PASSWORD "new_password";
CREATE USER user_name WITH PASSWORD "password";
\du
ALTER USER user_name WITH SUPERUSER;
DROP USER user_name;