pg_config
Display information about the installed PostgreSQL version. tldr-pages
On several platforms
Several platforms
Show the directory where PostgreSQL binaries are installed
pg_config --bindirIdentifyShow the directory for library files
pg_config --libdirIdentifyShow the directory for include files (C headers)
pg_config --includedirIdentifyShow the directory for shared data files
pg_config --sharedirIdentifyShow the directory for locale data
pg_config --localedirIdentifyDisplay help
pg_config --helpIdentifyDisplay version
pg_config --versionIdentify