Install PostgreSQL on Linux Last Updated : 24 Sep, 2021 Comments Improve Suggest changes Like Article Like Report This is a step-by-step guide to install PostgreSQL on a Linux machine. By default, PostgreSQL is available in all Ubuntu versions as PostgreSql "Snapshot". However other versions of the same can be downloaded through the PostgreSQL apt repository. We will be installing PostgreSQL version 11.3 on Ubuntu in this article. There are three crucial steps for the installation of PostgreSQL as follows: Check for the current version of PostgreSQL on your Ubuntu Install PostgreSQL Verify the installation Check for the current version of PostgreSQL You can check for the current version of PostgreSQL on your Ubuntu device by using the below command in the terminal: postgres -V Installing PostgreSQL on Ubuntu After checking if you need an update of PostgreSQL, follow the below steps to install the latest PostgreSQL version: Step 1: Add the GPG key for connecting with the official PostgreSQL repository using the below command: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -Step 2: Add the official PostgreSQL repository in your source list and also add it's certificate using the below command: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'Step 3: Run the below command to install PostgreSQL: sudo apt update sudo apt install postgresql postgresql-contrib Verifying the Installation of PostgreSQL There are couple of ways to verify the installation of PostgreSQL like connecting to the database server using some client applications like pgAdmin or psql. The quickest way though is to use the psql shell. For that follow the below steps: Step 1: Open the terminal and run the below command to log into PostgreSQL server: sudo su postgresStep 2: Now use the below command to enter the PostgreSQL shell: psqlStep 3: Now run the below command to check for the PostgreSQL version: SELECT version(); Comment More infoAdvertise with us Next Article Install PostgreSQL on Linux R RajuKumar19 Follow Improve Article Tags : Python PostgreSQL postgreSQL-basics Practice Tags : python Similar Reads Install PostgreSQL on Mac Installing PostgreSQL on Mac OS can enhance our development environment, providing a robust relational database management system. In this article, we will focus on installing PostgreSQL version 11.3 using the installer provided by EnterpriseDB. This step-by-step guide will ensure a smooth installat 3 min read Install PostgreSQL on Windows Installing PostgreSQL on your Windows 10 machine is straightforward with the PostgreSQL installer. In this article, we'll walk you through installing PostgreSQL version 11.3, ensuring a smooth setup process.Steps to Install PostgreSQL on WindowsThere are three crucial steps for the installation of P 2 min read How to Install Python on Linux This guide explains how to install Python on Linux machines. Python has become an essential programming language for developers, data scientists, and system administrators. It's used for various applications, including web development, data science, automation, and machine learning.This comprehensiv 15+ min read PostgreSQL Clients The PostgreSQL client is a command-line tool used to interact with PostgreSQL databases. It allows users to manage databases, execute SQL queries, and perform various administrative tasks without needing a graphical interface. In this article we will cover the key features of the PostgreSQL client, 4 min read Bitnami Applications for PostgreSQL Bitnami provides a range of pre-packaged applications for PostgreSQL, allowing users to deploy popular applications quickly and efficiently. These applications come bundled with PostgreSQL and making it easier to set up and manage databases without extensive configuration.In this article, we will ex 4 min read How to Configure PostgreSQL in Linux? Quick Preview to Configure PostgreSQL on Linux:Install PostgreSQL on Linux:On Linux Terminal, execute the command sudo apt-get updateTo install and execute the command, sudo apt install postgresql postgresql-contrib Check the Status of PostgreSQL on Linux:Checking status use command service postgres 5 min read How to Install PostgreSQL on a Mac with Homebrew Homebrew is a popular manager that is used for the installation of different types of software in the Mac as well as Linux operating systems. we can use Homebrew for installing other software instead of running specific commands. This improves the security as compared to not using homebrew for the i 6 min read What is PostgreSQL - Introduction This is an introductory article for the PostgreSQL database management system. In this we will look into the features of PostgreSQL and why it stands out among other relational database management systems. Brief History of PostgreSQL: PostgreSQL also known as Postgres, was developed by Michael Stone 2 min read How to Install python-kinterbasdb on Linux? In this article, we will be looking at the stepwise procedure to install the python-kinterbasdb for Python in Linux. KInterbasDB is a Python DB API 2.0 module for the relational databases Firebird and Interbase. It also exposes most of the native client API of the database engine, including two-phas 2 min read How to Install SQLObject package on Windows and Linux? An object-relational mapping is a bridge between the two worlds. SQLObject is a popular Object Relational Manager for provide an object interface to database, with tables as classes, rows as instances, and columns as attributes. Using an object-relational mapping doesnât mean that you donât need to 2 min read Like