On Ubuntu 20.04 you can install PostgreSQL with the following commands:
$ sudo apt update
$ sudo apt install postgresql postgresql-contrib
On Ubuntu, you may have to make a PostgreSQL user that matches your Ubuntu username.
Run these commands ONCE (replace UBUNTU_USERNAME
with your own username):
sudo su - postgres
createuser -P -s -e UBUNTU_USERNAME
exit
After this one time step, you wont need the sudo commands to create more databases and database users.