How to Start and Stop Postgresql server on Linux

In this tutorial, we are going to Start and Stop Postgresql server on CentOS 7 Linux distribution.

How to stop PostgreSQL Server on Linux:

To get the service name run the below command on Linux:

systemctl list-units|grep postgresql


systemctl stop postgresql-10 or service postgresql-10 stop


To verify the PostgreSQL server status:
systemctl status postgresql-10

How to start PostgreSQL Server on Linux:

systemctl start postgresql-10 or service postgresql-10 start


To verify the PostgreSQL server status:

service postgresql-10 status

</pre