Trouble with Vagrant

I am having some trouble finding my way with the proper use of Vagrant, while working on “Homework 1.2 : Enabling Authentication on a Running Replica Set”.

Here is what I am trying to do at this point.

…:m310-vagrant-env me$ cd shared/
…:shared me$ ls
…:shared me$ ./
./ line 28: mongod: command not found
./ line 28: mongod: command not found
./ line 28: mongod: command not found
MongoDB shell version v4.2.0
connecting to: mongodb://
2020-11-17T18:24:01.639+0900 E QUERY [js] Error: couldn’t connect to server, connection attempt failed: SocketException: Error connecting to :: caused by :: Connection refused :
2020-11-17T18:24:01.644+0900 F - [main] exception: connect failed
2020-11-17T18:24:01.644+0900 E - [main] exiting with code 1
…:shared me$

As one can see, I can’t run the script.

I presume I am not doing this in the right environment or the right place. But what is it exactly that I am doing wrong?
How can I check that I am in the right place?

You should be doing that on the VM machine. From your prompt it looks like you are running this from your host machine. Use vagrant ssh database to login to the VM.

Thanks. Indeed I realized my mistake in the mean time.