Internal Authentication with Keyfiles - not matching file name

I found this lesson a little confusing for many reasons. One of them, as I recognized now, is this difference. In the video, the name of the config files is “mongod_n” where n is a number. In the lecture notes I read this:

Deploying MongoDB with mongod1-auth.conf:
mongod -f mongod1-auth.conf

I didn’t understand what meaning had “mongod1-auth”. Until now; I think is an error instead of “mongod_1.conf”. In any case, I don’t know what -f is for, nor do I know very well what we are doing during part of the process, which seems to me not very well explained and maybe too fast with copy-paste.

Another reason for me to be confused is that I don’t understand the relation between this internal authentication and repeating the proccess of creating first user (localhost exception) in order to create new users again. And why we use ls /var/mongodb/pki/1/mongod-keyfile? It’s a double check about information we already know? Later, I saw that it’s not a fixed path (in exercise: “/var/mongodb/pki/node1/keyfile”), but in the lesson I didn’t know that.

Maybe I was in low energy in this lesson and it’s me, or maybe this lesson needs more explanation.

You can start mongod different ways like from command line or using config file
When you start it with mongod -f it means you are starting with config file.The param you are passing is the config file
You can name your config file whatever you want.The contents are important
It is for better understanding they name it node1.conf etc as you will be starting multiple mongods for replica
Node1-auth means your mongod is started with authentication enabled
You need keyfile auth between the nodes for replica setup
When you enable auth you will create first user with localhost exception(only once it is allowed).Thereafter you have to login with this user authenticating against admin db and create other users.
Course instructors can give more details or comment on the instructions