VM & Directory basic questions

Will describe myself as infrastructure-challenged. My SQL experience did not prepare me for VM. Hoping a kind soul will explain. Made it through 001, 103 and 201 - not a problem with Mongo per se - but still don’t have a handle on this infrastructure:
(vagrant was already installed no issues)
normal (Win10)command prompt:
c:…user…\M310\m310-vagrant-env

  • I had made the M310 folder and put the handout folder in it…so from there:

vagrant up --provision database
$ vagrant ssh database

  • brings me to prompt:
    vagrant@database:~$

so here is where I am lost. where is this? in one of the 2 VMs installed for this course I say to myself…

  1. to make directories i.e. /data/db …do I begin here?
    …with / symbol ?

  2. to put/use a config file … do I put it here in a folder?

if not - please do explain - hopefully you see once in vm-land my point of reference is confused …

vm-database is a pc nested inside my pc? and this prompt is the root starting point?..

…the ‘why’ you do it the way it is to be done is key for me…be gentle…

related I’ll add: * why/when ‘sudo’ …
* PC to VM1 to VM2 - -what allows move from world to world…

If you have complete 103 it is similar to what you did
In security course you will be using 2 VMs(database,infrastructure)
After completing your setup work and after running vagrant up
you should see below

C:\Users\user_name\M310\m310-vagrant-env>vagrant status
Current machine states:
database running (virtualbox)
infrastructure running (virtualbox)

This environment represents multiple VMs.
The VMs are all listed
above with their current state. For more information about a specific
VM, run vagrant status NAME.

Most of the time you will be working on database machine and for few labs using infrastructure VM
For creating config files and starting mongod use same concepts you used in m103
/ is the top most dir
Before creating any dis first check if dir exists or not and if you can create file under it
ex:
cd/data/db
touch test---->creates empty file
ls -lrt—>check zero bytes file created and ownership/permissions etc
shared dirs may be different here
Most of the time you will working as vagrant id
sudo is used where root permission are needed to create dirs or change permissions on those folders not owned by you(i,e vagrant)
You can use dbpath/logpath wherever you have read/write privs but follow the lab requirements

thanks Rama, am slowly getting the hang of the vm world…

when I am in VM/vagrant…in this course the prompt is:
vagrant@database$:

I may cd to look into other dir areas

must I return to vagrant@database$: in order to launch a mongod either via command line or config file…? or does it not matter which dir I happen to be in when that task is done…

vagrant@database$ is not a directory
It is Unix prompt to show you are vagrant user on host database
pwd command shows you your current dir.By default when you login it will be your home dir
You can switch to other dirs but need to be in the dir where you keep your config files or you can start mongod from another location also by giving full path of your config file location