{"id":22713,"date":"2023-10-28T08:31:59","date_gmt":"2023-10-28T08:31:59","guid":{"rendered":"https:\/\/linuxways.net\/?p=22713"},"modified":"2023-10-28T08:31:59","modified_gmt":"2023-10-28T08:31:59","slug":"how-to-install-pgadmin-in-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-pgadmin-in-ubuntu-22-04\/","title":{"rendered":"How to Install pgAdmin in Ubuntu 22.04?"},"content":{"rendered":"<p><strong>pgAdmin <\/strong>is the widely used and most popular GUI-based management Tool for PostgreSQL. \u201cpgAdmin\u201d is an advanced open-source tool that offers a better Graphical User Interface, and a simplified schema, and it also simplifies the use and creation of Database Objects. \u201cpgAdmin\u201d interacts with the PostgreSQL determined to Develop, Test and Maintain Databases.<\/p>\n<p>This article explains how you can install \u201cpgAdmin\u201d in Ubuntu 22.04.<\/p>\n<h2><strong>How to Install pgAdmin in Ubuntu 22.04?<\/strong><\/h2>\n<p>pgAdmin is Installed from the pgAdmin Repository. While installing pgAdmin, you can either install both the web mode and desktop mode together, which the \u201c<strong>apt install pgadmin4<\/strong>\u201d command does by default, or you can install pgAdmin Web Mode and pgAdmin Desktop Mode individually as well. Below are the steps that demonstrate how you can install pgAdmin in your Ubuntu System.<\/p>\n<h3><strong>Step 1: Update Packages<\/strong><\/h3>\n<p>Before installing \u201cpgAdmin\u201d, update the existing Ubuntu Repository to look for any packages that require upgrades. Use the \u201capt update\u201d command with sudo privileges:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt update<\/div><\/div>\n<p>Enter the sudo user password to look for updates in the packages:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"471\" class=\"wp-image-22749\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-1.png 881w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-1-300x160.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-1-768x411.png 768w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/p>\n<p>Once the Terminal completes updating, upgrade your Ubuntu Repository now with the \u201cupgrade\u201d command. Use the \u201capt upgrade\u201d command with sudo privileges to upgrade any packages that require to be upgraded to the latest version:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt upgrade<\/div><\/div>\n<p>Enter \u201cY\u201d during the upgradation to continue the process:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"329\" class=\"wp-image-22750\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-2.png 881w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-2-300x112.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-2-768x287.png 768w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/p>\n<h3><strong>Step 2: Install \u201ccurl\u201d<\/strong><\/h3>\n<p>Once the existing packages are updated, install \u201ccurl\u201d before you download \u201cpgAdmin\u201d. The \u201ccurl\u201d command downloads any packages from a server. With curl, not only can you Download packages, but you can also use it to transfer data to a server and retrieve data from a server. In most Ubuntu Systems, curl is pre-installed. If your system is missing curl, use the \u201capt install\u201d command to install curl:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> curl<\/div><\/div>\n<p>In our case, it was already installed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"873\" height=\"133\" class=\"wp-image-22751\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-3.png 873w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-3-300x46.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-3-768x117.png 768w\" sizes=\"auto, (max-width: 873px) 100vw, 873px\" \/><\/p>\n<h3><strong>Step 3: Download \u201cpgAdmin\u201d<\/strong><\/h3>\n<p>Now once \u201ccurl\u201d is installed, Open any Web Browser to download \u201cpgAdmin\u201d. In our case, we opened the Firefox Browser:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22752\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-4.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-4-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-4-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-4-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-4-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>\u201cpgAdmin\u201d should be downloaded from the official \u201cpgAdmin\u201d Website. Either search for the \u201cpgAdmin\u201d website or <a href=\"https:\/\/www.pgadmin.org\/\">Download pgAdmin<\/a> directly by visiting the web page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1716\" height=\"184\" class=\"wp-image-22754\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-5.png 1716w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-5-300x32.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-5-1024x110.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-5-768x82.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-5-1536x165.png 1536w\" sizes=\"auto, (max-width: 1716px) 100vw, 1716px\" \/><\/p>\n<p>On the official web page of \u201cpgAdmin\u201d, click on the Download option in the Navigation Bar:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1853\" height=\"418\" class=\"wp-image-22755\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-6.png 1853w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-6-300x68.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-6-1024x231.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-6-768x173.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-6-1536x346.png 1536w\" sizes=\"auto, (max-width: 1853px) 100vw, 1853px\" \/><\/p>\n<p>The Download page will appear which will consist of Operating System Options for \u201cpgAdmin\u201d packages. As you are using Ubuntu, click on the \u201cAPT\u201d option for the \u201cpgAdmin 4\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1850\" height=\"733\" class=\"wp-image-22756\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-7.png 1850w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-7-300x119.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-7-1024x406.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-7-768x304.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-7-1536x609.png 1536w\" sizes=\"auto, (max-width: 1850px) 100vw, 1850px\" \/><\/p>\n<p>The various Ubuntu Versions that are available for the pgAdmin APT Repository will be listed. Choose the APT repository for Ubuntu 22.04 Version:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1250\" height=\"768\" class=\"wp-image-22757\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-8.png 1250w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-8-300x184.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-8-1024x629.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-8-768x472.png 768w\" sizes=\"auto, (max-width: 1250px) 100vw, 1250px\" \/><\/p>\n<p>Scroll Down and you will see the \u201cpgAdmin\u201d repository setup commands for Ubuntu:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1066\" height=\"730\" class=\"wp-image-22758\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-9.png 1066w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-9-300x205.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-9-1024x701.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-9-768x526.png 768w\" sizes=\"auto, (max-width: 1066px) 100vw, 1066px\" \/><\/p>\n<p>Download the Public Key for the \u201cpgAdmin\u201d Repository using the \u201ccurl\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">curl <span class=\"re5\">-fsS<\/span> https:<span class=\"sy0\">\/\/<\/span>www.pgadmin.org<span class=\"sy0\">\/<\/span>static<span class=\"sy0\">\/<\/span>packages_pgadmin_org.pub <span class=\"sy0\">|<\/span> <span class=\"kw2\">sudo<\/span> gpg <span class=\"re5\">--dearmor<\/span> <span class=\"re5\">-o<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>share<span class=\"sy0\">\/<\/span>keyrings<span class=\"sy0\">\/<\/span>packages-pgadmin-org.gpg<\/div><\/div>\n<p>The cursor moves to the next line in the Terminal indicating the Public Key was added:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"882\" height=\"58\" class=\"wp-image-22759\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-10.png 882w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-10-300x20.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-10-768x51.png 768w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><\/p>\n<p>Now, Set up the Repository for the \u201cpgAdmin\u201d Configuration File using the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">sh<\/span> <span class=\"re5\">-c<\/span> <span class=\"st_h\">'echo &quot;deb [signed-by=\/usr\/share\/keyrings\/packages-pgadmin-org.gpg] https:\/\/ftp.postgresql.org\/pub\/pgadmin\/pgadmin4\/apt\/$(lsb_release -cs) pgadmin4 main&quot; &gt; \/etc\/apt\/sources.list.d\/pgadmin4.list &amp;&amp; apt update'<\/span><\/div><\/div>\n<p>The repository will be added to the Configuration File:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"883\" height=\"393\" class=\"wp-image-22760\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-11.png 883w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-11-300x134.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-11-768x342.png 768w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><\/p>\n<h3><strong>Step 4: Install \u201cpgAdmin\u201d<\/strong><\/h3>\n<p>Once the Public Key and the Packages are added to the Configuration File, install \u201cpgAdmin\u201d with the \u201capt install\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> pgadmin4<\/div><\/div>\n<p>The Terminal will start installing the packages, and wait for the installation process to complete:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"884\" height=\"483\" class=\"wp-image-22761\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-12.png 884w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-12-300x164.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-12-768x420.png 768w\" sizes=\"auto, (max-width: 884px) 100vw, 884px\" \/><\/p>\n<h3><strong>Step 5: Configure Web Interface<\/strong><\/h3>\n<p>After the packages are added and \u201cpgAdmin\u201d is installed, you have to configure the \u201cpgAdmin\u201d interface to start working with it. The first step in the configuration includes setting up the \u201cpgAdmin 4\u201d for web mode and then configuring the \u201cpgAdmin\u201d user account. Run the \u201csetup-web.sh\u201d script which will set up the pgAdmin 4 in Web Mode with the \u201csudo\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>pgadmin4<span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span>setup-web.sh<\/div><\/div>\n<p>Once the Web Mode Configuration for \u201cpgAdmin\u201d is completed, the Terminal will ask for the initial \u201cpgAdmin\u201d user account details:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"883\" height=\"118\" class=\"wp-image-22762\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-13.png 883w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-13-300x40.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-13-768x103.png 768w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><\/p>\n<p>Enter the email and password for the initial \u201cpgAdmin 4\u201d user:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"878\" height=\"193\" class=\"wp-image-22763\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-14.png 878w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-14-300x66.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-14-768x169.png 768w\" sizes=\"auto, (max-width: 878px) 100vw, 878px\" \/><\/p>\n<p>Once you Retype the password and hit \u201cEnter\u201d, the \u201cpgAdmin\u201d application will ask for the Apache Web Server configuration and mount the \u201cpgAdmin 4\u201d at \u201c\/pgadmin4\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"887\" height=\"297\" class=\"wp-image-22764\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-15.png 887w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-15-300x100.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-15-768x257.png 768w\" sizes=\"auto, (max-width: 887px) 100vw, 887px\" \/><\/p>\n<p>Enter \u201cy\u201d to continue configuring Apache Server and mounting the pgAdmin Application. As soon as the Apache Server is Configured, it will ask for the Server Restart. Enter \u201cy\u201d again to complete the pgAdmin installation. After the Apache Server restarts, the Terminal will show the local host URL where you can use the \u201cpgAdmin 4\u201d Application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"385\" class=\"wp-image-22765\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-16.png 885w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-16-300x131.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-16-768x334.png 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/><\/p>\n<h2><strong>Starting pgAdmin in Web Mode<\/strong><\/h2>\n<p>You can use the pgAdmin application once it is initialized. Once you\u2019ve installed and configured pgAdmin, the Terminal displays the local host link which can be used in the URL of a browser to access pgAdmin. Usually, the pgAdmin Web Application runs on the \u201c127.0.0.1\/pgadmin4\u201d URL:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1158\" height=\"167\" class=\"wp-image-22766\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-17.png 1158w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-17-300x43.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-17-1024x148.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-17-768x111.png 768w\" sizes=\"auto, (max-width: 1158px) 100vw, 1158px\" \/><\/p>\n<p>Clicking on the URL will redirect you to the Web page on the Default Web Browser and open the pgAdmin Web Page:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1849\" height=\"924\" class=\"wp-image-22767\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-18.png 1849w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-18-300x150.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-18-1024x512.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-18-768x384.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-18-1536x768.png 1536w\" sizes=\"auto, (max-width: 1849px) 100vw, 1849px\" \/><\/p>\n<p>In the Email and Password Input boxes, enter the email and password of the user that you created while configuring the pgAdmin Web Mode in the Terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1134\" height=\"570\" class=\"wp-image-22768\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-19.png 1134w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-19-300x151.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-19-1024x515.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-19-768x386.png 768w\" sizes=\"auto, (max-width: 1134px) 100vw, 1134px\" \/><\/p>\n<p>Once the email and password are entered, click on the Login button to access the pgAdmin Account:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"366\" class=\"wp-image-22769\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-20.png 510w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-20-300x215.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/p>\n<p>Wait for the pgAdmin User Page to load:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22770\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-21.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-21.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-21-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-21-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-21-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-21-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>The pgAdmin User Account Dashboard will open where you can Add a New Server, Configure Your Account, and do much more:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22771\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-22.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-22.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-22-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-22-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-22-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-22-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>This is one way of starting the pgAdmin Application through Web Mode.<\/p>\n<h2><strong>Starting pgAdmin in Desktop Mode<\/strong><\/h2>\n<p>The pgAdmin Application can also be used as an Ubuntu Application on the Desktop instead of using the Web browser and then accessing the pgAdmin through the URL. While installing the pgAdmin Application through the Repository, both the Desktop and the Web Mode for the pgAdmin Application are installed.<\/p>\n<p>If the pgAdmin Desktop Mode is not installed on your Ubuntu System, use the \u201capt install\u201d command to install pgAdmin:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> pgadmin4-desktop<\/div><\/div>\n<p>The \u201cpgAdmin4-desktop\u201d command only installs the Desktop Version of pgAdmin. Once installed, open the Applications Menu from your Ubuntu Home Screen:<\/p>\n<p>In the Applications Menu, click on the Search Bar to type the Application you want to search:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"906\" height=\"275\" class=\"wp-image-22772\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-24.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-24.png 906w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-24-300x91.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-24-768x233.png 768w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><\/p>\n<p>As we want to open pgAdmin, type pgAdmin in the Search Box. The pgAdmin Application icon will appear. Click on the application icon to start the application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"822\" height=\"358\" class=\"wp-image-22773\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-25.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-25.png 822w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-25-300x131.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-25-768x334.png 768w\" sizes=\"auto, (max-width: 822px) 100vw, 822px\" \/><\/p>\n<p>Wait for the application to initialize:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22774\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-26.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-26.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-26-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-26-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-26-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-26-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>Once the pgAdmin Application starts, you will see the pgAdmin Home Screen where you can add a New Server and make changes to your pgAdmin account as well:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22775\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-27.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-27.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-27-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-27-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-27-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-27-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h2><strong>Registering a Server in \u201cpgAdmin\u201d<\/strong><\/h2>\n<p>A new Server can be added to the pgAdmin Application. To Register a New Server, right-click on the Servers option in the left panel of the Application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1198\" height=\"238\" class=\"wp-image-22776\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-28.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-28.png 1198w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-28-300x60.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-28-1024x203.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-28-768x153.png 768w\" sizes=\"auto, (max-width: 1198px) 100vw, 1198px\" \/><\/p>\n<p>A drop-down menu will appear where you can register, create, refresh, and remove server groups. Click on the Register to expand it. In the additional expanded Register Option, click on the \u201cServer\u201d to Register your own Server:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"545\" height=\"327\" class=\"wp-image-22777\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-29.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-29.png 545w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-29-300x180.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-29-501x300.png 501w\" sizes=\"auto, (max-width: 545px) 100vw, 545px\" \/><\/p>\n<p>The Server Registration Menu will appear:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"551\" class=\"wp-image-22778\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-30.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-30.png 702w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-30-300x235.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/p>\n<p>Enter the Name of your Server in the \u201cName\u201d Field:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"556\" class=\"wp-image-22779\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-31.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-31.png 702w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-31-300x238.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-31-150x120.png 150w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/p>\n<p>In our case, we added the name \u201clocalhost\u201d. Once you have added the name click on the Connection option from the Menu Options:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"698\" height=\"552\" class=\"wp-image-22780\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-32.png 698w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-32-300x237.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-32-150x120.png 150w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/p>\n<p>Now in the Connection Menu, the Port, maintenance Database, and username are pre-added. Add the Host Name only if you want to continue with the custom default settings:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"554\" class=\"wp-image-22781\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-33.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-33.png 702w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-33-300x237.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/p>\n<p>Once the Hostname, username, and password are added for the new Server, click on the \u201cSave\u201d button:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"705\" height=\"554\" class=\"wp-image-22782\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-34.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-34.png 705w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-34-300x236.png 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/p>\n<p>The connections will be made successfully. If the connection fails, you have to set a password for your Postgres account as during the Creation of the Postgres Account, the password is not required:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"75\" class=\"wp-image-22783\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-35.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-35.png 697w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-35-300x32.png 300w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/p>\n<p>To set the password for the User, Switch to the Postgres User with the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"re5\">-i<\/span> <span class=\"re5\">-u<\/span> <span class=\"sy0\">&lt;<\/span>userName<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>In our case, the user name is \u201cdarren\u201d. Thus, to switch to the \u201cdarren\u201d Postgres User, the \u201csudo\u201d command will be:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"re5\">-i<\/span> <span class=\"re5\">-u<\/span> darren<\/div><\/div>\n<p>This will change the Command line to the Postgres Account for darren:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1153\" height=\"139\" class=\"wp-image-22784\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-36.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-36.png 1153w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-36-300x36.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-36-1024x123.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-36-768x93.png 768w\" sizes=\"auto, (max-width: 1153px) 100vw, 1153px\" \/><\/p>\n<p>Now, you have to Access the PostgreSQL Prompt with the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">psql<\/div><\/div>\n<p>Once you have accessed the User PostgreSQL Prompt, you can run commands and queries. The \u201c<strong>=#<\/strong>\u201d indicates the PostgreSQL Prompt is currently being used:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1152\" height=\"193\" class=\"wp-image-22785\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-37.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-37.png 1152w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-37-300x50.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-37-1024x172.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-37-768x129.png 768w\" sizes=\"auto, (max-width: 1152px) 100vw, 1152px\" \/><\/p>\n<p>You can now set the password for the Postgres User with the command \u201cpassword\u201d followed by the username of the User:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">\\password <span class=\"sy0\">&lt;&lt;<\/span>strong<span class=\"sy0\">&gt;<\/span>userName<span class=\"sy0\">&lt;\/<\/span>strong<span class=\"sy0\">&gt;&gt;<\/span><\/div><\/div>\n<p>In our case, the user is \u201cdarren\u201d. Thus to set the password for \u201cdarren\u201d, the command will be:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">\\password darren<\/div><\/div>\n<p>The Command Line will ask you to Enter the New Password and then Retype the Password for confirmation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1147\" height=\"107\" class=\"wp-image-22786\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-38.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-38.png 1147w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-38-300x28.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-38-1024x96.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-38-768x72.png 768w\" sizes=\"auto, (max-width: 1147px) 100vw, 1147px\" \/><\/p>\n<p>Once the Password is set for the User \u201cdarren\u201d, open the pgAdmin Connection Menu again and retype the new password. Click on the \u201cSave\u201d button as soon as you are done with the configuration:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"558\" class=\"wp-image-22787\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-39.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-39.png 707w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-39-300x237.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/p>\n<p>After the connection is set, you will see the server activity on the pgAdmin Dashboard:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22788\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-40.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-40.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-40-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-40-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-40-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-40-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>Moreover, you can expand the Servers and look for the \u201clocalhost\u201d server that you created earlier:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"547\" height=\"234\" class=\"wp-image-22789\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-41.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-41.png 547w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-41-300x128.png 300w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>Expanding the \u201clocalhost\u201d server will list the options for Databases, Tablespaces, and User Roles:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"546\" height=\"391\" class=\"wp-image-22790\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-42.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-42.png 546w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22713-42-300x215.png 300w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/p>\n<p>At this point, you are all set to use pgAdmin to perform any specific Postgres tasks.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p><strong>pgAdmin <\/strong>can be installed with the \u201capt install pgadmin4\u201d command, but before the installation, the Public Key should be added and the configuration file for the pgAdmin Repository should be set up. Once pgAdmin is installed, we can either use the Web Mode or the Desktop Mode. Each step is discussed in detail in this article.<\/p>","protected":false},"excerpt":{"rendered":"<p>To install pgAdmin on Ubuntu 22.04, first, add the public key, set up the repository configuration file, and then run the \u201capt install pgadmin4\u201d command. <\/p>","protected":false},"author":110,"featured_media":22753,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-22713","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=22713"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22713\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/22753"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=22713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=22713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=22713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}