How Do I Connect to Postgresql on Linux?

How Do I Connect to Postgresql on Linux?
Contents

How do I access PostgreSQL on Linux?

Connect to PostgreSQL from the command line. At the command line in your operating system, type the following command. [email protected]:~$ sudo -i -u postgres [email protected]:~$ psql psql (9.3.

How do I connect to a PostgreSQL database?

Set Up a PostgreSQL Database on Windows

  1. Download and install a PostgreSQL server. …
  2. Add the PostgreSQL bin directory path to the PATH environmental variable. …
  3. Open the psql command-line tool: …
  4. Run a CREATE DATABASE command to create a new database. …
  5. Connect to the new database using the command: c databaseName.
James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.