Cannot connect to internet or even ping from "Bash on ubuntu on Windows"
5,955
Solution 1
The problem you're having is because Microsoft still develops bash on Windows, and the network capabilities on Windows 10 are not fully implemented yet.
Though it was widely believed that it is implemented to more or less usable state, so of course there's a bug report. You can track the progress of solving the bug here, be sure to read comments of sunlimit user, they is a Microsoft employee, and explains the problem.
I'd recommend to make some kind of activity there — the more peoples interested, the faster it get fixed.
Solution 2
To solve the "unable to resolve host", do this
sudo rm /etc/hosts
close the window and run bash again to regenerate hosts file.
Related videos on Youtube
Author by
Girish Sunkara
Updated on September 18, 2022Comments
-
Girish Sunkara over 1 year
Unable to ping or download any packages. Below are the contents of resolv.conf
root@LAPTOP-UQSGIHE1:/mnt/c/# cat /etc/resolv.conf # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.100.1 nameserver 202.148.200.3 nameserver 202.148.202.4
oracle@LAPTOP-UQSGIHE1:/mnt/c/Windows/System32$ sudo ifconfig sudo: unable to resolve host LAPTOP-UQSGIHE1 Warning: cannot open /proc /net/dev (No such file or directory). Limited output.
-
Hi-Angel almost 8 yearsWhat does
ip addr
command show? And please, use markdown to format the question. -
Girish Sunkara almost 8 yearsoracle@LAPTOP-UQSGIHE1:~$ ip addr SO_SNDBUF: Invalid argument
-
Hi-Angel almost 8 yearsHmm… Does
ifconfig
throws errors too? And btw, it's important information which you better off include into the question than leave in comments. -
Girish Sunkara almost 8 yearsoracle@LAPTOP-UQSGIHE1:/mnt/c/Windows/System32$ sudo ifconfig sudo: unable to resolve host LAPTOP-UQSGIHE1 Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
-
-
Girish Sunkara almost 8 yearsIt is not working for me. I removed the /etc/hosts and reopened bash.
-
Nathan Lutterman over 7 yearsHere's the link for voting for the issue directly on the Windows Developer Feedback page: wpdev.uservoice.com/forums/…