Install PostgreSQL in Ubuntu 20.04
Updated, Jun 10, 2021
1 minutes to read
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