How To Install Postgres on Ubuntu 20.04
Published on 26 November 2020 12:00 AM
- Update and install postgres
sudo apt update -y && sudo apt install -y postgresql postgresql-contrib
- Start the postgres service
sudo service postgresql start
- Connect to the Postgres prompt
psql
command as the postgres account directly with sudo:
sudo -u postgres psql
- Once in
psql
you can change password for default rolepostgres
:
\password postgres
- To exit psql, type:
\q