How to Install PgAdmin4 on Ubuntu

How to Install PgAdmin4 on Ubuntu

Discover PgAdmin4, a robust open-source GUI tool, designed for managing PostgreSQL databases. Think of PgAdmin4 as your command center, making database management, maintenance, and administration simple and accessible. This user-friendly interface enables interaction with the database without using complex command lines, making it suitable for beginners and convenient for seasoned users alike. Follow our step-by-step guide to seamlessly install PgAdmin4 on Ubuntu 22.04.

1. Start by updating your system packages. Ensure your system is up-to-date using the following commands:

sudo apt-get update
sudo apt-get upgrade

2. Check if PostgreSQL is installed. If PostgreSQL is already set up on your server, proceed to the next step. If not, install PostgreSQL using this command:

sudo apt-get install postgresql
Installation of PostgreSQL in Terminal

Next, add the repository for PgAdmin4 to your server.

3. Install the public key for the PgAdmin4 repository:

curl | sudo apt-key add

4. Create the repository configuration file:

sudo sh -c 'echo "deb pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

5. Choose your preferred mode for PgAdmin4 installation:

  • For both desktop and web modes:
sudo apt install pgadmin4
  • For desktop mode only:
sudo apt install pgadmin4-desktop
  • For web mode only:
sudo apt install pgadmin4-web 
Process of installation of Pgadmin4

Wait for the installation to complete. Once successfully installed, you can access the Pgadmin4 application from your Ubuntu main menu. You’re now ready to manage your PostgreSQL databases with ease.

Looking to deploy Linux in the cloud? With Gcore Cloud, you can choose from Basic VM, Virtual Instances, or VPS/VDS suitable for Linux:

Choose an instance

Subscribe to our newsletter

Stay informed about the latest updates, news, and insights.