I've spent lots of time to find Postgres configuration files like pg_hba.conf
or postgresql.conf
in different distributions of linux and also postgres versions itself! and I was very confused...
Postgres find configuration files in linux
22.4k Views Asked by S.Hossein Asadollahi At
2
Finally, I found the global solution for it.
First, you should follow these steps:
Type
su - postgres
or, if that does not work,sudo -i -u postgres
and hitEnter
.Type
psql
and hitEnter
.To find out the location of the postgres configuration file
postgresql.conf
, type:The output should be like this:
And to find out the location of the postgres
pg_hba.conf
file, type:There, the output should be like this: