Syntax Error: "Missing semicolon"

So all “mongosh” commands I should be running from os prompt? And do i need to get out of the mongosh shell altogether?