• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install PostgreSQL on Linux Mint 20

  • 00:36 lsb_release -a
  • 00:50 wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
  • 01:00 sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
  • 01:04 apt install postgresql postgresql-contrib -y
  • 01:23 su postgres
  • 01:29 psql
  • 01:32 \conninfo
  • 01:42 ss -atulpn | grep postgres
{{postValue.id}}

To Install PostgreSQL on Linux Mint 20

Introduction:

PostgreSQL is the most advanced, powerful open-source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. This tutorial will cover the installation of PostgreSQL on Linux Mint 20. Installation Procedure: First I am check the version of my linux mint version by using following command

root@LinuxHelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20
Release:	20
Codename:	ulyana

Now I am import the GPG key of PostgresSQL by using following command

root@LinuxHelp:~# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
OK

Now I am add the postgres repository by using following command

root@LinuxHelp:~# sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

Now I am install postgresSQL by using following command

root@LinuxHelp:~# apt install postgresql postgresql-contrib -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libllvm10 libpq5 postgresql-12 postgresql-client-12 postgresql-client-common
  postgresql-common sysstat
Suggested packages:
.
.
Processing triggers for systemd (245.4-4ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for doc-base (0.10.9) ...
Processing 1 added doc-base file...

Now I am switch the postgres user by using following command

root@LinuxHelp:~# su postgres

Now I am check the version of the postgres by using following command

postgres@LinuxHelp:~$ psql
psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))
Type "help" for help.

Now I am view the information of the postgres database by using following command

postgres=# \conninfo

You are connected to database "postgres" as user "postgres" via socket in "/var/run/postgresql" at port "5432".

Now I am exit from the postgres shell

postgres=# exit

now I am check the listening port of postgres by using following command

postgres@LinuxHelp:~$ ss -atulpn | grep postgres
tcp     LISTEN   0        244            127.0.0.1:5432           0.0.0.0:*      users:(("postgres",pid=5592,fd=3))  

With this method the installation of the PostgreSQl on Linux Mint 20 is comes to an end.

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the use of PostgreSQL?

A

PostgreSQL is a general-purpose object-relational database management system. It allows users to add custom functions
developed using different programming languages such as C/C++, Java, etc.

Q

How do add the key for PostgreSQL?

A

by using the following command to add the key
#wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Q

How do you check the listening ports on Postgres?

A

by using the following command to check the listening ports of postgre
#ss -atulpn | grep postgres

Q

What are the features of PostgreSQL?

A

Complex SQL queries
SQL Subselects
Foreign Keys
Trigger views
Transactions
Multiversion currency COntrol
Streaming Replication
Hot Standby

Q

How do you add the repository on PostgreSQL?

A

By using following command to add the repository on postgreSQL
#sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Elijah ?
Remote Desktop Connection Has Stopped Working

When accessing my remote machine server using remote desktop on a windows machine I am getting this error

forum (1)

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.