If your database in the local system. Then you type the below command. for Linux terminal
mongodump -h SERVER_NAME:PORT -d DATABASE_NAME
If database user and password are there then you below code.
mongodump -h SERVER_NAME:PORT -d DATABASE_NAME -u DATABASE_USER -p PASSWORD
This worked very well in my Linux terminal.