As in MongoDB 3.4, there is no explicit option to disable the history function mongo.
A possible workaround is to create a read-only history file. The shell mongowill continue to work without errors if the file .dbshellcannot be read or written.
, Unix- :
echo "" > ~/.dbshell
chmod 0 ~/.dbshell
MongoDB, , : SERVER-29103: .dbshell.