sudo -u postgres psql
postgres=# ALTER USER postgres WITH PASSWORD '1234567890';
CREATE USER uTest
CREATE ROLE uTest WITH LOGIN;
ALTER USER uTest WITH PASSWORD '1234567890';
CREATE DATABASE bTest;
GRANT ALL PRIVILEGES ON DATABASE bTest TO uTest;
# Install the public key for the repository (if not done previously):
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
# Create the repository configuration file:
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
# Install pgAdmin (for both desktop and web modes)
sudo apt install pgadmin4