Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Ubuntu 16.04 - Install PostgreSQL 10

Postgresql 10 has been out for a while now. One of the features that was added that I'm pretty keen on is better support for parallel queries which is worth migrating away from MySQL for.


Copy, paste and execute the commands below:

echo 'deb xenial-pgdg main' | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-10 -y

Check Version

If you want to check what version of PostgreSQL you are now running, use the following command:

sudo -u postgres psql postgres -c 'SELECT version()' | grep PostgreSQL

Configure It

After having installed PostgreSQL, you probably want to spend a bit of time configuring it (passwords etc).


Last updated: 3rd September 2023
First published: 16th August 2018