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:  Add Show Desktop In Ubuntu 18.04 Dock

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

Ubuntu 23.04 Official Flavors Released Ubuntu 23.04 Official Flavors Released Linux
Essential Ubuntu Applications 80+ Essential Ubuntu 22.04 LTS Applications In 2023 Ubuntu
How To Install Wine On Ubuntu 18.04 LTS How To Install Wine On Ubuntu 18.04 LTS ubuntu 18.04
How To Install Atom Text Editor On Ubuntu 18.04 LTS How To Install Atom Text Editor On Ubuntu 18.04 LTS ubuntu 18.04
Top 9 Best Photoshop Alternatives For Linux Top 9 Best Photoshop Alternatives For Linux For 2023 Ubuntu
Install ScanGear MP2, Cnijfilter2 & UFRII Drivers In Ubuntu 20.04 Via PPA. Install ScanGear MP2, Cnijfilter2 & UFRII Drivers In Ubuntu 20.04 Via PPA. Tools

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]
  • Whole Body Order Writer (Body Care, Makeup, Vitamins, Nutrition – Buyer / Inventory Replenishment…

    • Portsmouth, NH
    • Whole Foods Market
    • Full Time
  • Specialty Order Writer (Beer, Wine, Cheese & Chocolate Buyer / Inventory Replenishment) – Full Time

    • Sedona, Yavapai County, AZ
    • Whole Foods Market
    • Full Time
  • Sports Columnist

    • Baltimore, MD
    • The Baltimore Sun
    • Full Time
  • Internal Communications Manager, Journalist, and Writer

    • Washington DC
    • Prowess Consulting
    • Full Time
  • Customs Entry Writer – Import Operations – Charlotte, NC

    • Charlotte, NC
    • Altius Talent | Freight Forwarding Recruitment
    • Full Time
  • Technical Author

    • Erie, PA
    • Akkodis
    • Full Time
  • Senior Data Scientist

    • San Francisco, CA (Remote)
    • FATMAP
    • Full Time
  • User Experience Writer

    • San Antonio, TX
    • Brooksource
    • Full Time

Copyright © 2025 Technology News Information & Jobs.

Powered by PressBook Grid Blogs theme