Hendra Nicholas I am a software engineer, consultant and CEO at 41studio currently living in West Java, Indonesia. My interests range from programming to sport. I am also interested in entrepreneurship, technology, and design.

How to Install PostgreSQL For Local Rails Development On Ubuntu 19.04

18 sec read

PostgreSQL & Rails

Before install PostgreSQL we need to update apt package list to do so :

sudo apt update

After that we can install PostgreSQL and dependencies :

sudo apt install postgresql postgresql-contrib

To switch into Postgres account :

sudo -i -u postgres

Now you can access PostgreSQL prompt by running command :

psql

Exit out of the PostgreSQL prompt by typing :

postgres=# \q

To accessing a PostgreSQL prompt without switching accounts just run :

sudo -u postgres psql

To change your postgres user password, run this inside your PostgreSQL prompt :

postgres=# \password

Hendra Nicholas I am a software engineer, consultant and CEO at 41studio currently living in West Java, Indonesia. My interests range from programming to sport. I am also interested in entrepreneurship, technology, and design.