Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (9.5k points)
edited by

I used this code “ postgres -D /usr/local/pgsql/data “ to start the postgresql progress and ctrl+z to stop it. Now, when I use createuser and psql I get no response. 

Can anyone tell me how to restart my postgresql? 

1 Answer

0 votes
by (19.7k points)

Ctrl+z ---- it pause the execution and move the current process to background 

Ctrl-z + bg ----- to start the process to run in the background

Ctrl-z + fg ------ to run the process in the foreground ( you can’t enter new commands into prompt when fg is running )

postgres -D /usr/local/pgsql/data &  ----- add ‘&’ at the end of your command, if you want to run your process in the bg from the start. 

Interested in Linux? Check out this Linux Certification by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Apr 9, 2021 in Linux by sheela_singh (9.5k points)
0 votes
1 answer
asked Feb 24, 2021 in Linux by sheela_singh (9.5k points)
0 votes
1 answer

Browse Categories

...