09-08-2023, 01:11 PM
After installing PostgreSQL, check whether it is enabled and active. Use the systemctl or service command utility to verify the service status:
sudo service postgresql status
sudo systemctl status postgresql
If PostgreSQL is enabled, your command line will output active and loaded, similar to the following:

In addition to the service status, check whether PostgreSQL is ready to accept a connection using this command:
sudo pg_isready

