After the upgrade I noticed that I don't have internet access. The wired network and the wifi settings looked good, but it didn't work. After the login the system always switched itself into airplane mode. I tethered the network via USB and Bluetooth by my mobile but they also didn't work.
-
1Ubuntu Development version / How to participate – sudodus Apr 04 '18 at 11:48
-
I agree the decision. And I understand the rule. You have to see that if you have a notebook with an upgraded ubuntu without internet, it is very hard to find the answer by your phone. answers.launchpad.net isn't as well indexed as askubuntu.com – Zoltán Süle Apr 04 '18 at 12:50
-
2@sudodus Please reopen. 18.04 is out and I ran into the exact same issue! – user5950 Apr 28 '18 at 15:32
-
@user5950, I cannot do it alone, but I will cast my reopen vote :-) But it may not work. -- In any case I suggest that you ask a new question (with similar title and text, but not exactly the same). – sudodus Apr 28 '18 at 19:29
-
@user5950: follow the accepted answer that I copied from launchpad.net (andrew-woodhead666). It worked for me. If this is your problem, it will fix it. – Zoltán Süle Apr 29 '18 at 20:53
-
how come such a bug is allowed into a dist version? I'm around with no web access for hours! Shame! – João Pimentel Ferreira Feb 16 '19 at 16:28
-
I reported the bug on launchpad. You can subscribe if you are involved: https://bugs.launchpad.net/ubuntu/+bug/1816530 – Zoltán Süle Feb 19 '19 at 09:18
10 Answers
Update 2: the bugreport was refused because I couldn't reproduce it on the already upgraded system and couldn't provide data for the developers.
Update 1: I reported the bug on launchpad. You can subscribe if you are involved: https://bugs.launchpad.net/ubuntu/+bug/1816530
if the /etc/resolv.conf
is empty but you can ping 8.8.8.8
$ echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
if the /etc/resolvconf/resolv.conf.d/head
is empty then you have to repeat the command above after every restart except you do this:
$ echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolvconf/resolv.conf.d/head > /dev/null
then you have to restart the resolvconf and the networking
$ sudo systemctl enable resolvconf
$ sudo systemctl start resolvconf
$ sudo /etc/init.d/networking restart

- 1,099
-
+1. This is helpful (although not quite according to the rules (AskUbuntu is only about released versions). – sudodus Apr 04 '18 at 11:52
-
I am facing similar issue, see https://askubuntu.com/questions/1021888/ubuntu-18-04-beta-cannot-connect-to-wifi-internet?noredirect=1#comment1659461_1021888, but your solution doesn't seem to work for me. Can you elaborate a bit on what this command tries to achieve? – Eftychia Thomaidou Apr 04 '18 at 11:58
-
@EftychiaThomaidou: Did you restart the network?
sudo /etc/init.d/networking restart
? Can you ping 8.8.8.8? What is the content of/etc/resolv.conf
? Do your wired and wifi setting look good? Do you see them if you runifconfig -a
? What is in the/etc/network/interfaces
file? What is the output ofsudo nmcli d
? – Zoltán Süle Apr 04 '18 at 12:05 -
@ZoltánSüle plz find in the link some of the answers. I am able to pink 8.8.8.8 but not www.ubuntu.com. I just restarted the network, but nope. My interfaces file looks as
`auto lo iface lo inet loopback
#auto wlo1 #iface wlo1 inet dhcp wpa-ssid
wpa-psk ` As i saw in another reply i added the last 4 lines in my file. But my laptop could no longer see any wifi networks, thus I commented them out.
– Eftychia Thomaidou Apr 04 '18 at 12:33 -
2is the nameserver set in the
/etc/resolv.conf
file? If not addnameserver 8.8.8.8
to this file – Zoltán Süle Apr 04 '18 at 12:48 -
6adding the nameserver in the
/etc/resolv.conf
and restarting bysudo /etc/init.d/networking restart
did the magic! Thanks a lot!! – Eftychia Thomaidou Apr 04 '18 at 13:11 -
1@EftychiaThomaidou, Congratulations and thanks for sharing your solution/confirming that this method works :-) – sudodus Apr 04 '18 at 13:26
-
2@sudodus @EftychiaThomaidou: you have to add it to
/etc/resolvconf/resolv.conf.d/head
too. Otherwise you have to repeat the editing of the/etc/resolv.conf
file after every reboot. – Zoltán Süle Apr 04 '18 at 13:58 -
1This is a workaround, but not a good solution, and will probably break your system in unpredictable ways in the future. You should use the network configuration GUI or netplan to configure your network properly. – JanC May 02 '18 at 19:18
-
@JanC: that was the first thing that I did (tried to configure it by the GUI), but it didn't help. I will install a fresh 18.04 this weekend and I will compare the two systems. – Zoltán Süle May 03 '18 at 08:36
-
Try removing the current configuration in the GUI and then re-add it (if you remove the resolvconf hack before doing so, that should get you the default configuration back). – JanC May 03 '18 at 20:09
-
BTW: make sure your network (router) assigns a correct nameserver with DHCP if that's how you configure it. – JanC May 03 '18 at 20:11
-
These instructions work, but let's not forget that this is just a DNS setting issue. These instructions direct you to setting it to google's public DNS (8.8.8.8) while you can easily set it to your own DNS, whatever that may be. In my case, I use my router's ability to act as a DNS server. So, I followed the instructions and instead of using 8.8.8.8 I just put in my private gateway address ex(192.168.1.1) to get it to work. This problem should be described as a naming resolution problem, and not necessarily an internet problem as you can browse sites via IP. – G_Style Aug 10 '18 at 04:26
-
thank you! I had an 169 series IP address and had to comment. does that belong to the DHCP server? – asgs Sep 28 '18 at 07:14
I agree with some other folks here that the selected answer is probably not the best way to fix the issue:
When a file has a comment at its beginning that says
"DO NOT EDIT THIS FILE"
then there is probably a very good reason to, well, ... not edit that file! ;-)
And here is why, as well as a suggestion for a better (IMHO) solution:
a. the file /etc/resolv.conf
, that you modified, will be overwritten at boot time, so your modification won't 'stick'.
b. the ip address (127.0.0.53) that was originally in there (before you modified it) is actually the address of a DNS stub resolver. It's there! You can ping it! it's running locally on your machine. What is a stub resolver? It takes your DNS queries and looks in its cache for a resolution! If it can't find any, it will reach out to a real DNS server (and then cache the result). So, if you overwrite the address of the stub resolver, you're going to miss out on this important caching function of the stub resolver!
The problem with this new resolver method in Ubuntu 18.04 is that the 'real' DNS server address was never set. So, if the stub resolver doesn't find your requested domain in its cache, it doesn't know what DNS server to query. (Hence your domain name based internet accesses no longer working).
So all you have to do is configure the 'real' DNS server that this stub resolver must use. And you do this by editing (sudo!) /etc/systemd/resolved.conf
Simply add something like
DNS=8.8.8.8
to that file.
Then restart the network, or rather, reboot, so you can verify that you now have a solution that is persistent across reboots.
(What I haven't figured out yet, is why DHCP doesn't properly set the correct DNS server!)

- 111
- 1
- 4
-
-
3I added "DNS=8.8.8.8 8.8.4.4 4.2.2.2" and then ran "systemctl restart systemd-resolved' and it worked. – Larry R. Irwin Jun 20 '19 at 18:57
-
Just use the IP address for all the sites you want to visit, then you don't need DNS, problem solved! – Stack Underflow Nov 13 '19 at 16:34
-
Accepted answer did solve my problem. However, as everyone else stated, that is only until you reboot which I do daily with my machine. Typing 5 to 6 lines in the terminal every time I start the system up isn't something I would find amusing.
After digging on the internet I found a solution to permanently solve the problem. I rebooted 3 times afterward just to be sure, internet connection is there and I don't have to do anything.
Solution:
Start the terminal and type:
$ ifconfig
Now you gotta figure out which is your Ethernet interface. Mine is listed as eth1
. Next type:
$sudo gedit /etc/network/interfaces
My file only had:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
Now what you need to do is to add the following lines afterwards:
auto eth1
iface eth1 inet dhcp
Lastly, $ sudo ifup eth1
, reboot and you're done. Don't forget to change eth1
with the name of your Ethernet interface.

- 1,955

- 71
-
This is the answer that did it for me. My computer abruptly disconnected from the router immediately after the update. That means I couldn't even visit the router's landing page at 192.168.0.1. I wrote a script called estalker.sh, which watches the ability to curl google.com like a hawk. The instant I typed in
sudo ifup eno1
, estalker reported internet access and the landing page refreshed in chromium to show a working admin console. – Braden Best Jan 15 '19 at 22:42
tl;dr
First, edit this file
sudo vim /etc/resolvconf/resolv.conf.d/base
Second, Add the following
nameserver 8.8.8.8
nameserver 8.8.4.4
After that, restart Ubuntu, should have internet now.
Explain
Some of the solution listed worked, but will failed once restart Ubuntu (in my case, VM),
The above solution is a tl;dr form this solution (https://unix.stackexchange.com/a/128223/243480) and it worked perfectly

- 151
-
why does this file have '/base'? The file seems located as /etc/resolvconf/resolv.conf.d – Andrés Parada Nov 06 '18 at 17:29
-
2For my ubuntu, it does have /base, and resolv.conf.d is a directory – Ng Sek Long Nov 07 '18 at 01:17
-
2
-
1Yes, just as you said: /etc/resolv.conf will be wiped after reboot. Yours is the solution I used, except I used nano ;-) – Bastion Jun 13 '19 at 03:41
-
-
1
I was having the same issue on ubuntu 18.04 and the above answer didn't work for me as I didn't have a folder named /etc/resolvconf/resolv.conf.d/
. So I did the following
sudo mkdir -p /etc/resolvconf/resolv.conf.d
sudo touch /etc/resolvconf/resolv.conf.d/head
Then I added nameserver 8.8.8.8
to the file /etc/resolvconf/resolv.conf.d/head
Then a simple network restart solved the issue.
sudo /etc/init.d/networking restart

- 11
On the non-working updated PC the symlink was :
/etc/resolv.conf -> /run/resolveconf/resolv.conf
On a working PC with 18.04 the symlink was :
/etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
then I replace the old linked file with a new one :
rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
(work after procedures described below)

- 243
Changing /etc/resolv.conf
is not the best answer to this problem. According to Ubuntu 16.04 documentation resolv.conf
file can be overwritten by system at any time.
If you are using static IP configuration you should add one line to you /etc/network/interfaces
file in you ethernet card configuration. It should look something like:
iface eth0 inet static
address 192.168.3.3
emsp;netmask 255.255.255.0
gateway 192.168.3.1
dns-nameservers 8.8.8.8
And then to restart your network run:
/etc/init.d/networking restart
If you want to avoid any possible problems in the future, you can do one more thing. Upgrading from 16.04 to 18.04 does not change network configuration method from /etc/network
to new /etc/netplan
used in 18.04. If you want to change it manually look at How to enable netplan on ubuntu server upgraded from 16.04 to 18.04

- 10,783
-
if other people confirm this is the right answer, I will accept it! Consider that my answer comes from the official ubuntu page (launchpad) and the main problem is the missing name server IP setting. Fixing the internet is important if you want to install anything like
netplan.io
. – Zoltán Süle Aug 20 '18 at 09:27
Hello All Almost total noob here but I ran into this problem when I started dual booting between Windows 10 and loaded Ubuntu 18.04 on a separate hard drive. My internet wouldn't connect and my router wouldn't allow me to open up the configuration interface. I finally figured out that it was because I had DCHP set to assign a static IP to Windows 10. After checking all the information I could find and nothing working I loaded Windows 10 and removed the routers static IP from the DHCP settings. That got internet working but I wanted a static IP for Windows and Ubuntu. Best I can figure is that Ubuntu doesn't take the hand off from the routers DHCP server properly despite being set to automatic. Once I manually configured the static IP address and Gateway in Ubuntu could I go back to having aforesaid static IP. Hope this helps someone. Drew
In my case, i have tried many answers, unfortunately, all can not work in my computer.
Here is my solution.
I think no internet after upgrade from 16.04 to 18.04, this problem is most likely caused by the loss of the network driver. What you need to do is to reinstall it.
Visit this link intel network driver, and download the driver.
The version I am using is e1000e-3.8.4
, i haven't tried whether other version can work.
After downloading, extract this file to a folder. Enable root privileges:
sudo -i
Then, enter the src
directory.
cd e1000e-3.8.4/src/
Note that you should change the version if you use a different driver. Compile the driver module.
make install
If this step is successful, it is good. But here i meet a problem.
error: redefinition of ‘skb_frag_off’
To solve this problem, you can open this file: src/kcompat.h
. In this file, there is a function, skb_frag_off
, comment it. And then type make install
again, this should work.
Finally, enter
modinfo e1000e
modprobe e1000e [parameter=port1_value,port2_value]
At this point, you should be able to connect to the network normally.

- 101