Following steps are for starting a PostgreSQL database locally on your machine
and accessing it as a postgres
user.
sudo apt install postgresql
- note down the version with
psql --version
sudo systemctl start postgresql
(Normal debian using systemd)
sudo service postgresql start
(WSL2 without systemd)
sudo -u postgres psql
\password postgres
Then, save the password you chose to your config files.
sudo -u postgres createdb NAME
sudo -u postgres dropdb NAME