Majority of all the servers running across the globe use a Linux-based operating system. It comes as no surprise that Linux is one of the most prevalent operating systems that developers prefer to use. Alongside these servers, databases also play a crucial role in the web infrastructure.

As a developer, you might be inclined to run PostgreSQL, a popular relational database, on your local Linux machine. Here's how you can install pgAdmin, an easy-to-use GUI tool that can help you manage these databases on Linux.

What pgAdmin Has to Offer

It is essential to have PostgreSQL installed and configured on your Linux distribution before you can start using this tool to manage your databases.

This GUI tool acts as an easier medium for you to interact with the database without having to delve into the command-line interface. Here are some nifty features that pgAdmin provides:

  • Powerful query tool with color syntax highlighting
  • Fast datagrid for display/entry of data
  • Graphical query plan display
  • Auto-vacuum management
  • Monitoring dashboard
  • Backup, restore, vacuum, and analyze on-demand

Installing pgAdmin on Ubuntu

Open up a terminal emulator of your choice and start by adding the pgAdmin public key using the following command:

        sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
    

Once done, run the command given below to create the repository configuration file:

        sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
    

Output:

Add repository for pgAdmin

You can either opt to install only the desktop mode, web mode, or both modes depending upon your requirements. Pick one of the commands given below that suits your needs:

Desktop-only mode:

        sudo apt install pgadmin4-desktop
    

Web-only mode:

        sudo apt install pgadmin4-web
    

Both modes:

        sudo apt install pgadmin4
    
Installing pgAdmin on Ubuntu

In case you chose to install the web mode, you will need to configure the web server by running the setup script:

        sudo /usr/pgadmin4/bin/setup-web.sh
    

Output:

pgAdmin web UI

With that, you're ready to use pgAdmin to manage and interact with your SQL database and perform various database operations with ease.

Database Management Made Easy

Configuring a database according to your project needs is hard enough but it doesn't have to be harder to manage your data, thanks to pgAdmin. Whether it's your local database or a remote database hosted on the cloud, you can use this tool to manage your data across multiple platforms.

Choosing the right database is not an easy decision to make. Looking for a suitable database for your upcoming project? Here are some database engines that you should consider.