sudo systemctl status postgresql

Category: Databases & SQL

sudo systemctl status postgresql

Show PostgreSQL service status

Reports whether the postgresql unit is active, the postmaster process IDs, and the newest log lines. The exit code is nonzero when the service is down, which makes it usable in scripts. Add --no-pager for cron and CI output.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.