How to Install and Use PostgreSQL on Ubuntu 18.04

How to Install and Use PostgreSQL on Ubuntu 18.04

Hi,

I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my system and need to install it.

What are the process of installing PostgreSQL on Ubuntu 18.04 operating system?

Thanks

View Answers

January 30, 2019 at 3:21 AM

Hi,

You can install Postgresql database on your Ubuntu 18.04 with following commands:

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

After completion of installation run postgresql service with following command:

sudo systemctl restart postgresql

You can check the status of service with following command:

sudo systemctl status postgresql.service

This will give following output:

root@deepak-VirtualBox:/home/deepak# sudo systemctl status postgresql.service
  postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2019-01-30 14:38:20 IST; 12min ago
 Main PID: 22168 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 2320)
   CGroup: /system.slice/postgresql.service

Jan 30 14:38:20 deepak-VirtualBox systemd[1]: Starting PostgreSQL RDBMS...
Jan 30 14:38:20 deepak-VirtualBox systemd[1]: Started PostgreSQL RDBMS.

Thanks









Related Tutorials/Questions & Answers:
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04  Hi, I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my... on Ubuntu 18.04 operating system? Thanks   Hi, You can install Postgresql
How to Install and Use PostgreSQL on Ubuntu 18.04
How to Install and Use PostgreSQL on Ubuntu 18.04  Hi, I want to install PostgreSQL on Ubuntu 18.04. I have Ubuntu 18.04 desktop installed on my... on Ubuntu 18.04 operating system? Thanks   Hi, You can install Postgresql
Advertisements
install graphviz ubuntu 18.04
install graphviz ubuntu 18.04  Hi, How to install graphviz ubuntu 18.04? Thanks   Hi, here are commands: sudo add-apt-repository universe sudo apt update sudo apt install graphviz Thanks
install nvm ubuntu 18.04
that's why i want to use nvm. How to install nvm on Ubuntu 18.04? Thanks  ...install nvm ubuntu 18.04  Hi, I want to install the nvm tool... application development. On ubuntu you can install with following command: curl
install nvm ubuntu 18.04
that's why i want to use nvm. How to install nvm on Ubuntu 18.04? Thanks  ...install nvm ubuntu 18.04  Hi, I want to install the nvm tool... application development. On ubuntu you can install with following command: curl
How to install JDK 10 in Ubuntu 18.04?
Java/JDK 10: How to install JDK 10 in Ubuntu 18.04? Java/JDK 10 is already... on the Ubuntu 18.04 operating system and then install JDK 10 on it. I have... Oracle Java 10. Here are the steps of install JDK 10 on Ubuntu 18.04 Step 1
How to install Docker in Ubuntu 18.04?
How to install Docker in Ubuntu 18.04? - Step by Step guide to install and use Docker in Ubuntu 18.04 In this tutorial we are going to use fresh... know how to use the apt-get package manager to install software on Ubuntu box
Install Spark on Ubuntu 18.04
How to Install Spark on Ubuntu 18.04 and test? Installing Apache Spark latest.... In this section we are going to install Apache Spark on Ubuntu 18.04 for development... purpose we will install Ubuntu 18.04 operating system on Oracle VirtualBox
Install Spark on Ubuntu 18.04
How to Install Spark on Ubuntu 18.04 and test? Installing Apache Spark latest.... In this section we are going to install Apache Spark on Ubuntu 18.04 for development... purpose we will install Ubuntu 18.04 operating system on Oracle VirtualBox
How to install OpenJDK 8 in Ubuntu 18.04?
How to install OpenJDK 8 in Ubuntu 16.04/18.04? In this tutorial we are going... of JDK. You can use the apt-get installer on Ubuntu operating system to install...({}); Steps to install OpenJDK 8 in Ubuntu 18.04 Let's follow the step by step
how to install anaconda in ubuntu
how to install anaconda in ubuntu  Hi, I have to use Ubuntu... to now install Anaconda Python on Ubuntu and trying to find steps to do it. how to install anaconda in ubuntu? Thanks   Hi, Anaconda Python distribution
How to install Ubuntu 16.04 LTS?
How to install Ubuntu 16.04 LTS?  Hi, Latest version of Ubuntu 16.04 LTS. This video tutorial teaches you to install Ubuntu 16.04 LTS on Your Oracle Virtual Box. Thanks   How to install Ubuntu 16.04 LTS
How to install Neo4j on Ubuntu 15.10?
How to install Neo4j on Ubuntu 15.10?  How to install the latest version of Neo4j on Ubuntu? Thanks
How to download and install Ubuntu 16.04?
How to download and install Ubuntu 16.04?  Hi, Recently Ubuntu 16.04... to download and install it computer. Tell me How to download and install Ubuntu 16.04...;Hi, Here are steps to download and install Ubuntu 16.04 LTS: Download
run ubuntu 18.04 in docker interactive mode
run ubuntu 18.04 in docker interactive mode  Hi, I want to run Ubuntu 18.04 in Docker container in the interactive mode. After running in the interactive mode I have to install some software for testing. How to run ubuntu 18.04
How to install ffmpeg on Ubuntu 16.04?
computer. I forgot the command to install ffmpeg . How in can install ffmpeg on Ubuntu 16.04? Thanks   Hi, How to install ffmpeg on Ubuntu 16.04? Use...How to install ffmpeg on Ubuntu 16.04?  Hi, My new Ubuntu 16.04 LTS
How to install p7zip on Ubuntu 16.04?
How to install p7zip on Ubuntu 16.04?  Hi, What is the correct command to install p7zip on Ubuntu? How to install p7zip on Ubuntu 16.04? Thanks   Hi, To install p7zip on Ubuntu 16.04 following the following steps
How to install pip on Ubuntu 16.04?
How to install pip on Ubuntu 16.04?  Hi, How to install pip on Ubuntu 16.04? I am running the command apt-get install pip, but its not working. Thanks   Hi, You can us the Correct command: sudo apt-get install
How to install virtualbox guest additions in Ubuntu 16.04?
How to install virtualbox guest additions in Ubuntu 16.04?  Hi, How to install virtualbox guest additions in Ubuntu 16.04? The problem is I am.... Thanks   Hello, After installing the virtualbox guest additions in Ubuntu
How to install autoconf, automake and libtool in Ubuntu 15.10?
How to install autoconf, automake and libtool in Ubuntu 15.10?  Hi, How to install autoconf, automake and libtool in Ubuntu 15.10? Thanks   For installing these components use the following command: sudo apt-get
Installing oracle Java 8 on Ubuntu 18.04
Installing oracle Java 8 on Ubuntu 18.04  Hi, What are the steps for installing oracle java 8 on ubuntu 18.04? I want to install Oracle Java 8 on my Ubuntu 18.04 desktop. Ubuntu 18.04 is the latest version of Ubuntu Server
How to install MySQL Server and Client on Ubuntu 16.04?
How to install MySQL Server and Client on Ubuntu 16.04?  Hi, Latest... want to learn MySQL and finding tutorials for installing MySQL. How to install... to install MySQL on Ubuntu 16.04. Command: Install MySQL 5.7: First of all update
How to install jre on Ubuntu 16.04 LTS?
How to install jre on Ubuntu 16.04 LTS?  Hi, I have installed Ubuntu... with the tutorial for installing jre on Ubunut. How to install jre on Ubuntu 16.04 LTS? Thanks   Hi, Its easy to install jre on Ubuntu. Use following
how to install wireshark 2.6 2 on ubuntu 16.04
how to install wireshark 2.6 2 on ubuntu 16.04  Hi, how to install wireshark 2.6 2 on ubuntu 16.04? Thanks   Hi, You can to add Add... wireshark 2.6 2 on ubuntu 16.04 with following command: sudo apt-get install
how to install anaconda in ubuntu for all users
how to install anaconda in ubuntu for all users  Hi, I want to install anaconda for all users in Ubuntu. how to install anaconda in ubuntu for all... directory as described in following tutorial: how to install anaconda
How to install Oracle JDK 8 on Ubuntu?
How to install Oracle JDK 8 on Ubuntu?  Hi, What are the steps to install Oracle JDK 8 on Ubunut? I am installing JDK 8 on Ubuntu 14.04. Thanks... to install Oracle JDK 8 on Ubuntu? In this tutorial I will show you how you can install
How to install LAMP server on Ubuntu 16.04 LTS?
How to install LAMP server on Ubuntu 16.04 LTS?  I have given the task to install LAMP sever on Ubuntu 16.04 LTS. How to install LAMP server on Ubuntu 16.04 LTS? Thanks   Hi, For install LAMP on Ubuntu 16.04 LTS apt
How to install gtk-doc-tools package in Ubuntu?
How to install gtk-doc-tools package in Ubuntu?  How to install gtk... how to install this package on Ubuntu? To install gtk-doc-tools package on Ubuntu you can open the terminal and then type following command: apt-get install
How To Install Google Chrome on Ubuntu 16.04?
How To Install Google Chrome on Ubuntu 16.04?  Hi, What are the correct steps to install Chrome on Ubuntu 16.04? How To Install Google Chrome on Ubuntu 16.04? Thanks   HI, Follow the steps given below to install
How to install Eclipse in Ubuntu using terminal?
How to install Eclipse in Ubuntu using terminal?  Hi, How to install Eclipse in Ubuntu using terminal? I am looking for good explanation for installing the eclipse on Ubuntu 16.04. Thanks   Hi, You can use
How to install Ubuntu 22.04 LTS on Oracle Virtualbox?
Ubuntu 22.04 LTS - How to install Ubuntu 22.04 LTS on Oracle Virtualbox... you how to install Ubuntu 22.04 on the Virtualbox running on the Window 10... 22.04 in Virtualbox as guest operating system you will be able to use Ubuntu
pip install beautifulsoup - install beautifulsoup on Ubuntu
want to install beautifulsoup on my Ubuntu desktop operating system. What is the command to install beautifulsoup on Ubuntu 18.04? Thanks   Hi... then use following command: pip install beautifulsoup4 or with easy install
How to Install Oracle Java JDK 8 in Ubuntu 16.04?
How to Install Oracle Java JDK 8 in Ubuntu 16.04?  Hi, Let's know the commands to install Oracle Java 8 on Ubuntu 16.04. How I can install Oracle Java 8? How to Install Oracle Java JDK 8 in Ubuntu 16.04? Thanks   Hi
How to Install VirtualBox in Ubuntu 20.04?
VirtualBox Tutorial - How to Install VirtualBox in Ubuntu 20.04... and OpenSolaris, OS/2, and OpenBSD. How to Install VirtualBox in Ubuntu 20.04? We will learn how to install VirtualBox in Ubuntu 20.04 step by step. So, following
command to install pip in ubuntu
command to install pip in ubuntu  Hi, I recently installed Ubuntu... requirement to install other Python packages. I want to install the pip in my Ubuntu. What is the command to install pip in ubuntu? Thanks   Hi, Here
command to install pip in ubuntu
command to install pip in ubuntu  Hi, I recently installed Ubuntu... requirement to install other Python packages. I want to install the pip in my Ubuntu. What is the command to install pip in ubuntu? Thanks   Hi, Here
How to install Chrome in Ubuntu 22.04 LTS?
Chrome in Ubuntu 22.04 - How to install Chrome in Ubuntu 22.04 LTS? Google... easily install it your Ubuntu desktop. In this tutorial I will provide you the steps to install Chrome in your Ubuntu 22.04 operating system. We have also
Installing Anaconda Python on Ubuntu
on your system. Video Tutorial: How to install Anaconda Python on Ubuntu 18.04...How to Install Anaconda Python on Ubuntu and test with simple program? In this tutorial we are going to install Anaconda Python on Ubuntu 16.04/18.04
Install Ubuntu 20.04 on virtualbox Windows 11
Install Ubuntu 20.04 on virtualbox Windows 11  Hi, How I can download and Install Ubuntu 20.04 on virtualbox Windows 11? Thanks   Hi, Visit: https://ubuntu.com/download/desktop and download Ubuntu 20.04 ISO. After
How to install PHP 5 on Ubuntu 15.10?
How to install PHP 5 on Ubuntu 15.10? Ubuntu provides easy to use apt-get tool... is the video tutorial of "How to install PHP and modules in Ubuntu? ":ADS_TO_REPLACE_1 What is the command to install PHP 5 on Ubuntu? Ubuntu is Debian
Download and Install Ubuntu 19.04 on Oracle VirtualBox
Ubuntu 19.04 Tutorial: Learn to Download and Install Ubuntu 19.04 on Oracle VirtualBox The Ubuntu 19.04 operating system is released with many new features... software as shown below: Now we will install Ubuntu 19.04 in this newly
Download and Install Ubuntu 19.04 on Oracle VirtualBox
Ubuntu 19.04 Tutorial: Learn to Download and Install Ubuntu 19.04 on Oracle VirtualBox The Ubuntu 19.04 operating system is released with many new features and improvements. This version of Ubuntu is based on the Linux Kernal 5.0
Install PySpark on Ubuntu
Install PySpark on Ubuntu - Learn to download, install and use PySpark on Ubuntu Operating System In this tutorial we are going to install PySpark... and install JDK 8 or above on Ubuntu operating system. If JDK 8
Install PySpark on Ubuntu
Install PySpark on Ubuntu - Learn to download, install and use PySpark on Ubuntu Operating System In this tutorial we are going to install PySpark... system check tutorials How to install Anaconda in Ubuntu?.ADS_TO_REPLACE_3 You
How to upgrade Ubuntu to Ubuntu 16.04 LTS?
How to upgrade Ubuntu to Ubuntu 16.04 LTS?  Hi, I have old system running the Ubunut 14.04 and now I want to upgrade it to latest version of Ubuntu 16.04 LTS. How to do upgrade? Thanks   Hi, Here is video
How to see ubuntu version on server?
How to see ubuntu version on server?  Hi, Its easy to see the version of Ubuntu on the Ubuntu Desktop operating system. But I have a server on which I have ssh access. How to see ubuntu version on that server? Thanks  
How to upgrade Ubuntu 16.04 LTS?
How to upgrade Ubuntu 16.04 LTS?  Hi, I want to learn the process of upgrading the Ubuntu 16.04. Provide me more details. Thanks
how to find jdk path in ubuntu?
how to find jdk path in ubuntu?  How to find out the path of installed jdk in ubuntu? Could anyone tell that command to execute from terminal.. Thanks
how to run jdbc program in linux-ubuntu?
how to run jdbc program in linux-ubuntu?   how to run jdbc program in linux-ubuntu
How to install GParted Partition Manager?
on the Linux based system. In this video tutorial we have used Ubuntu server and showd you how to install this software. What is GParted Partition Manager... computer. Here is the video tutorial:ADS_TO_REPLACE_2 How to install? Login

Ads