Computer >> Computer tutorials >  >> Programming >> MongoDB

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.

How to clear console in MongoDB?

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

Ctrl+L;

The following is the output −

How to clear console in MongoDB?

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

How to clear console in MongoDB?

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

How to clear console in MongoDB?

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

How to clear console in MongoDB?