ifup eth0: unknown host
11,330
Remount root read-write:
mount -o remount,rw /
This is so you can edit files under /etc/
.
Edit /etc/network/interfaces
Add:
auto enp0s2
iface enp0s2 inet dhcp
Run: ifup enp0s2
It is 'enp0s2' and not 'eth0' because of kernel modifications that were added to support Predictable Network Interface Names
Related videos on Youtube
Author by
b-boy
Updated on September 18, 2022Comments
-
b-boy over 1 year
unfortunately, i am in Ubuntu Recovery Mode.
I need Internet connection but, i fail to bring it up.$ ifconfig enp0s2 Link encap:Ethernet HWaddr xxxx inet addr: inet6 addr: ... lo Link encap:local ... $ sudo ifup enp0s2 Ignoring unknown interface enp0s2=enp0s2 $ sudo ifconfig up enp0s2 enp0s2: Unknown host
The router has connection to the Internet and the laptop is proper connected via cable.
So, why nobody loves me?
And, how do i bring Ethernet up?BTW: why is it 'enp0s2' and not 'eth0' as usual?
-
Panther about 8 yearsdid you remount your root partition rw ? see wiki.ubuntu.com/RecoveryMode
-
-
b-boy about 8 yearsNice. 'ifup' works now. But, still i can't 'ping google.com'. It says 'unknown host'.
-
Acceptable Name about 8 yearsEdit
/etc/resolv.conf
addnameserver 8.8.4.4
-
b-boy about 8 yearsNope. ping still aint working. Although, i didnt restart anything.
-
Acceptable Name about 8 yearsDoes
ping -n 8.8.4.4
work? -
b-boy about 8 years$ ping -n 8.8.4.4 connect: Network is unreachable
-
b-boy about 8 yearsSorry, my bad. A typo in /etc/network/interfaces. Works now. (Although, one question from the initial post still unanswered...)
-
Acceptable Name about 8 yearsNobody loves you because you don't understand what love is. If you understood what love is you would realize how much you are loved.
-
pivanchy over 7 years@MettaCrawler, will this solution work, if I want to
enable
eth0? And what is the reason of remounting root?