Fix no network in Bash console in Windows 10

If you installed Bash in Windows 10 and the network does not work for you, e.g. you cannot connect to some host via ssh, here is a quick fix for you which will help you to resolve this issue. See the instructions below.

Networking in bash may not work due to improper DNS resolving in the bash session. It is probably a bug in the Linux subsystem, since it is very new component of Windows 10.

To fix non-working network in Bash console in Windows 10, just add the correct DNS server to the Linux component of Windows 10. Here's how.

  1. Open Bash. You can launch it right from the Start menu or using the method described HERE.
  2. At the bash console, execute the following command:
    echo nameserver 8.8.8.8 > /etc/resolv.conf

    Replace the portion 8.8.8.8 with the actual address of your DNS server. If you don't know your DNS server address, you can definitely use 8.8.8.8, which is the public DNS server provided by Google. It usually always works.
    See the following screenshot:

Once this is done, your bash network should be up and running. Here's Winaero.com opened in the console browser "Links" on the fixed bash instance:

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

6 thoughts on “Fix no network in Bash console in Windows 10”

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.