Reputation: 1302
I have postgres installed.How to open postgres command Line? When i open command prompt, i have
Microsoft Windows [Version 10.0.17134.590]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\dhanr>
How to navigate to postgres command Line, as my final goal is to run pg_dump dbname > outfile
command.
Upvotes: 3
Views: 6974
Reputation: 5623
You should use psql command-line tool.
You can find psql at your installation directory. Example;
C:\Program Files\PostgreSQL\10\bin\psql.exe
Upvotes: 7
Reputation: 32021
Go inside bin folder in C drive where Postgres is installed. run following command in git bash or Command prompt: pg_ctl.exe restart -D "" Ex: pg_ctl.exe restart -D "C:\Program Files\PostgreSQL\9.6\data"
Another way: type "services.msc" in run popup(windows + R). This will show all services running Select Postgres service from list and click on start/stop/restart.
Upvotes: 1