You need to add Mongo’s bin folder to the Path Environment Variable. Here’s how on Windows 10:
- Find your bin folder.
If you’re not sure where it is, it’s probably in
C:\Program Files\MongoDB\Server\3.4\. It should look like this:
- Copy the path to the bin folder, this should be
- Press win, type
env, Windows will suggest “Edit the System Environment Variables”, click that.
- On the Advanced tab, click “Environment Variables”
- With the Path variable highlighted, click Edit:
- Click “New”
- Paste your path to the bin folder. Make sure it ends with a
- Press “OK”, “OK”, “OK”
Now you should be able to run
mongo from anywhere in a command window.