Skip to content
Technology News Information & Jobs

Technology News Information & Jobs

Ubuntu Tutorials, Ubuntu How To , Linux Tips, Tech Jobs

  • Work with US
  • Search Jobs
  • Post a Job
  • Contact Us
  • Ubuntu
    • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • Themes
  • Linux
  • Laptops
  • Tutorials
  • Job Dashboard
  • Toggle search form
Install PostgreSQL On Ubuntu Linux

Install PostgreSQL On Ubuntu Linux

Posted on October 10, 2021October 10, 2021 By admin No Comments on Install PostgreSQL On Ubuntu Linux

PostgreSQL, or Postgres, is a free, powerful, and open-source relational database management system developed at the University of California.

In this tutorial post, We are going to show you the steps to install PostgreSQL on Ubuntu Linux along with the pgAdmin4 web-based management tool.

How To Install PostgreSQL On Ubuntu Linux

PostgreSQL packages are included in Ubuntu default repositories but it might not be the latest version. Our answer to your question of how to install PostgreSQL and pgAdmin4 Ubuntu Linux is below:

Run the commands below to add the PostgreSQL repository key and file to Ubuntu operating system:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Now, run the commands below to update and install the latest PostgresSQL packages in your Ubuntu Linux:

To install PostgreSQL 11, run the commands below

sudo apt update
sudo apt-get install postgresql postgresql-contrib

After you are done with the process of installing PostgreSQL in Ubuntu, run the following commands below to stop, start and enable.

sudo systemctl stop postgresql.service
sudo systemctl start postgresql.service
sudo systemctl enable postgresql.service

Now if you want to validate that PostgreSQL is installed and running, run the commands below.

sudo systemctl status postgresql.service

You might see something like below:

READ More Relevant Stuff:  Ubuntu 18.04 LTS Bionic Beaver Released : Download Now

When you run the commands above, it should show something similar to the one below.

● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
   Active: active (exited) since Wed 2021-10-10 10:21:01 CDT; 17s ago
 Main PID: 7930 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4663)
   CGroup: /system.slice/postgresql.service

Oct 10 10:21:01 ubuntu2004 systemd[1]: Starting PostgreSQL RDBMS.
Oct 10 10:21:01 ubuntu2004 systemd[1]: Started PostgreSQL RDBM

Now, if you want to use and access the PostgreSQL shell, you need to switch users and login to the shell as a Postgres user.

sudo su - postgres

Now use the psql command to invoke the interactive shell so that you can create and manage PostgreSQL databases.

psql

How to install pgAdmin4 web portal

Run the commands below to install pgAdmin4 in Ubuntu so that you can manage PostgreSQL server.

sudo apt-get install pgadmin4 pgadmin4-apache2

During the installation, you will be prompted to enter a PostgreSQL user password.

After installing, you can access the web portal by opening your web browser and going through the server hostname or IP address followed by pgAdmin4 URI

http://example.com/pgadmin4

Ubuntu, ubuntu 18.04, Ubuntu 20.04 Tags:Postgresql, ubuntu

Post navigation

Previous Post: Best Harddisk Cloning Tools For Linux [2023]
Next Post: Ubuntu 22.04 LTS Codename Is “Jammy Jellyfish”

Related Posts

Configure Lid Close Behavior Of Your Laptop With Ubuntu 20.04 LTS Configure Lid Close Behavior Of Your Laptop With Ubuntu 20.04 LTS How To Ubuntu
Ubuntu Tutorial Blog Welcome To Itsubuntu.com | Ubuntu Tutorial Blog Ubuntu
kernel update First Kernel Update with Patch for Spectre Variant 4 Flaw Is Out For Ubuntu 18.04 LTS Ubuntu
reset gnome desktop in ubuntu Reset Gnome Desktop In Ubuntu 18.04 LTS ubuntu 18.04
This Valentine Day, Ubuntu 18.04.02 LTS Will Be Out This Valentine Day, Ubuntu 18.04.02 LTS Will Be Out Ubuntu
ubuntu 16.04 to ubuntu 18.04 How To Upgrade Ubuntu 16.04 to Ubuntu 18.04 LTS Ubuntu

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Enable Hibernate in Ubuntu 22.04 LTS May 20, 2024
  • Popular Ubuntu Games: Top 5 Games To Play March 17, 2024
  • WordPress | Your site doesn’t include support for the “generateblocks/container” block GenerateBlocks Plugin February 11, 2024
  • Ubuntu Autoremove Command Debian Autoremove Command February 10, 2024
  • How To Mount Windows 11 Shares on Debian Linux December 7, 2023
  • Anonymous Browsing 101: A Deep Dive Into Residential Proxies November 20, 2023
  • How To Correctly Install Uninstall Linux Ubuntu Nvidia Drivers Fast October 31, 2023
  • Ethical Web Design: The Dos and Don’ts October 28, 2023
  • Understanding the Role of Security Operations Center October 25, 2023
  • The Positive Effects of AI Tools and Online Services on Students Successful Essay-Writing Skills October 3, 2023
  • Linux Wget Examples September 27, 2023

Categories

  • Android
  • Apple
  • Blogs
  • Debian
  • Fix
  • Gadgets
  • Game
  • Google
  • How To Ubuntu
  • Internet
  • Laptops
  • Linux
  • Linux Commands
  • Linux Game
  • Linux Mint
  • News
  • Operating Systems
  • Security
  • Technology
  • Themes
  • Tools
  • Tutorials
  • Ubuntu
  • ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • Windows 11
  • Wordpress
  • Search Jobs
  • Post a Job
  • Job Dashboard
  • Contact Us
  • About US
  • Cookie Policy
  • Terms and Conditions
  • Privacy Policy
  • Sitemap
  • Write For US

Tags

android apps centos ChatGPT command Commands Debian deepin Desktop docker Fedora fix game games Gaming gnome google kernel linux linux commands linux kernel Linux laptops Linux Mint Linux themes minecraft NVIDIA Python Raspberry Pi sysadmin themes ubuntu ubuntu 18.04 Ubuntu 18.04 LTS Ubuntu 20.04 ubuntu 20.04 lts Ubuntu 22.04 LTS Ubuntu games Ubuntu kernel ubuntu themes ubuntu tutorial VirtualBox Windows Windows 11 Wine WSL
itsubuntu.com is an Equal Opportunity Employer. For Advertisement, Jobs, Guest posts, and any other thoughts, email us at [email protected]
  • SERVICE WRITER – FLOAT

    • Sauk City, WI
    • McFarlane's
    • Full Time
  • User Experience Writer

    • Orlando, FL
    • Radiant Digital
    • Full Time
  • Customs Entry Writer

    • Long Beach, CA
    • Coda Search│Staffing
    • Full Time
  • Technical Writer

    • Carlsbad, NM
    • Airswift
    • Full Time
  • Technical Writer

    • Palo Alto, CA
    • DeWinter Group
    • Full Time
  • Technical Writer

    • Hanover, MD
    • TAD PGS, Inc.
    • Full Time
  • Senior Data Scientist

    • San Francisco, CA (Remote)
    • Patreon
    • Full Time
  • Technical Writer

    • Michigan
    • US Tech Solutions
    • Full Time

Copyright © 2025 Technology News Information & Jobs.

Powered by PressBook Grid Blogs theme