Skip to content

Instantly share code, notes, and snippets.

@alaztetik
Created May 8, 2021 08:14
Show Gist options
  • Save alaztetik/1051c3df362fabc7e7eeabf078d16c4c to your computer and use it in GitHub Desktop.
Save alaztetik/1051c3df362fabc7e7eeabf078d16c4c to your computer and use it in GitHub Desktop.
PostgreSQL install and start-up on Linux
sudo pacman -Sy postgresql
sudo -u postgres -i initdb /var/lib/postgres/data
sudo systemctl start postgresql && sudo systemctl status postgresql
sudo systemctl enable postgresql
sudo su - postgres
psql
# SQL commands
exit
sudo systemctl stop postgresql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment