Install PostgreSQL in Ubuntu 20.04
Updated, Jun 10, 2021
1 minutes to read
![feature-image](https://cdn.hashnode.com/res/hashnode/image/upload/v1623646498411/vRCMOHFJ_.png?w=1600&h=840&fit=crop&crop=entropy&auto=compress)
Install PostgreSQL in Ubuntu 20.04
update system
sudo apt-get update
install postgreSQL
sudo apt install postgresql postgresql-contrib
open postgreSQL
sudo -i -u postgres psql
close
\q
create new user
sudo -u postgres createuser --interactive
create new database
sudo -u postgres createdb sammy
add the new user in ubuntu 20.04
sudo adduser sammy
change user password
sudo -u postgres psql
ALTER USER samy PASSWORD 'myPassword';
\q