Advertisement

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.Windows 10 bash in all apps Windows 10 bash in start menu
  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:Windows 10 bash add dns server

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:Windows 10 working network

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!

Advertisеment

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.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.