Skip to content

Instantly share code, notes, and snippets.

View eagskunst's full-sized avatar
:shipit:
Working from home

Emmanuel Guerra eagskunst

:shipit:
Working from home
View GitHub Profile
@eagskunst
eagskunst / run_mongodb_windows_wsl2_ubuntu.md
Created August 15, 2020 17:08
Run a MongoDB server from Windows and connect to it from WSL2 Ubuntu
  1. Start PowerShell/CMD as admin and run the following command: mongod --dbpath="C:\Program Files\MongoDB\Server\4.2\data". --bind_ip=0.0.0.0

Your server now must be running

  1. From the unix terminal (Ubuntu in my case) run the following command: cat /etc/resolv.conf The output should be something like this (if you have automatic generation enabled, which it is by default:
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:

Answers for the developer pre-test