HomePostgreSQLArticle
PostgreSQL Mechanics
PostgreSQL 18 Installation Step by Step (Windows, Mac, Linux & Docker) | Master Class E01
Install PostgreSQL 18 step by step on Windows, Mac, Linux, and Docker, then prove which server you actually reached: the client, the server version, and the data directory. This PostgreSQL 18 installation tutorial covers one path per platform: - macOS uses Homebrew postgresql@18 - Ubuntu and Debian use the PGDG packages and the postgresql@18-main cluster - Windows uses the EnterpriseDB installer, Path, and the postgresql-x64-18 service - Docker uses the postgres:18 image, with the named volume mounted at /var/lib/postgresql The Docker persistence demo was run on this machine: docker rm leaves the volume, and docker volume rm deletes it.
The macOS, Ubuntu, and Windows commands are the install path, and they are marked when they were not executed here. pg_isready only tells you the server is accepting connections. It does not log you in. SHOW data_directory needs a superuser or pg_read_all_settings. Next in the PostgreSQL Master Class: psql, and how a prompt can look fine when you are in the wrong database.
PostgreSQL Master Class
Watch the video for the full walkthrough. Use this page when you want the argument in writing without scrubbing the timeline.