initdb

Create a PostgreSQL database on disk. More information: <https://www.postgresql.org/docs/9.5/app-initdb.html>.

Install

All systems
curl cmd.cat/initdb.sh
Debian Debian
apt-get install postgresql-9.1-dbg
Ubuntu
apt-get install postgresql-9.3-dbg
Arch Arch Linux
pacman -S postgresql-old-upgrade
image/svg+xml Kali Linux
apt-get install postgresql-11
CentOS
yum install postgresql-server
Fedora
dnf install postgresql-server
Windows (WSL2)
sudo apt-get update sudo apt-get install postgresql-9.3-dbg
Raspbian
apt-get install postgresql-9.5

Create a PostgreSQL database on disk. More information: <https://www.postgresql.org/docs/9.5/app-initdb.html>.

  • Create a database at `/usr/local/var/postgres`:
    initdb -D /usr/local/var/postgres

© tl;dr; authors and contributors