$ sudo apt update
$ sudo apt install postgresql postgresql-contrib
$ sudo systemctl start postgresql.service
$ sudo -i -u postgres OR sudo -u postgres psql
$ psql
postgres=# \q
postgres=# \l
postgres=# DROP DATABASE db_name;
postgres=# CREATE DATABASE db_name;
postgres=# CREATE USER user_name WITH ENCRYPTED PASSWORD 'some_password';
postgres=# GRANT ALL PRIVILEGES ON DATABASE db_name TO user_name;
DROP TABLE table_name;
\c database_name
\dt