1

Every time I need to start mongo on my terminal I have to enter mongod on the terminal then create another instance of the terminal and finally enter mongo to get it up and running.

How do I skip running mongod?

P.S: I am following a tutorial and my instructor entered brew services start mongo on his mac terminal so that he doesn't need to enter mongod again and again. Is there any alternative for this on Linux? I'm using Manjaro (Arch Linux) btw

Shreemaan Abhishek
  • 1,134
  • 1
  • 7
  • 33
  • In general, `mongod` starts the MongoDB database server (its one time action). Once the server is up, you can perform administrative, DDL, DML actions on it. You don't need to start an instance again and again. `mongo` is a client tool; so are MongoDB Compass or a program written to access the database server. Some useful information at [Install MongoDB on manjaro](https://stackoverflow.com/questions/59455725/install-mongodb-on-manjaro). – prasad_ Jul 02 '21 at 11:24
  • @prasad_ wrong. mongod stands for mongo daemon. `You don't need to start an instance again` to get MongoDB running on my terminal, not starting another instance of my terminal sounds practically impossible to me. Because the first terminal will have the server running on it and I cannot get mongo running on that same terminal instance, I'd have to interrupt the mongo server to do that! – Shreemaan Abhishek Jul 02 '21 at 12:43
  • What is [mongod](https://docs.mongodb.com/manual/reference/program/mongod/) and [mongo](https://docs.mongodb.com/manual/reference/program/mongo/). You can start `mongod` at a terminal command prompt as a _background_ process. And, use the same or any number terminals to connect to the `mongod` (the database server) from a client like `mongo` shell. You can also connect to the server using other client tool like Compass or a client program (using a programming language and [driver software](https://docs.mongodb.com/drivers/)). – prasad_ Jul 02 '21 at 13:17
  • This works fine with Linux/Unix/MacOS operating system (Windows has no background process option to start the server, but it can be started as a _service_ as in Linux/Unix/MacOS). – prasad_ Jul 02 '21 at 13:18
  • Have you looked at https://wiki.archlinux.org/title/MongoDB? – Joe Jul 03 '21 at 00:38

0 Answers0