How to clear console in MongoDB?


To clear console in MongoDB, you can use any of the following two syntaxes.

The first syntax is as follows, which is the usage of keyboard shortcut −

Ctrl + L

After pressing the above key, you can clear console in MongoDB.

The second syntax is as follows −

cls

To understand the above syntaxes, let us implement them one by one. Here is the snapshot of my console.

The first query is as follows to clear console in MongoDB −

Ctrl+L;

The following is the output −

Look at the above sample output, the console has been cleared. Let us check the console once again.

The second query is as follows to clear console i.e. type “cls” −

After pressing enter key, the console will clear. The screenshot of the sample output is as follows −

Updated on: 30-Jul-2019

758 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements