$ apt-get install -y postgresql-client
.
$ psql --version
psql (PostgreSQL) 14.8 (Ubuntu 14.8-0ubuntu0.22.04.1)psql
stackoverflow.com » Correct way to install psql without full Postgres on macOS
# For psql,
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"hub.docker.com » starting postgres locally
Start the PostgreSQL database locally with the following command:
docker run --rm --name postgres16 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=secret -d postgres:16-alpine