How to view mongodb’s existing index?

  mongodb, question

See on the Internet
View all indexes in the database db.system.indexes.find ()
db.system.indexes.find()

Why is it like this after I enter it

clipboard.png

This command should be input under mongodb’s shell, not under the operating system’s shell. First, execute mongo and input various mongodb commands, like this

clipboard.png