Ubuntu (alternate) server 18.04: no network interfaces
Networking in Ubuntu Server 18.04 and later is handled by netplan and no longer in /etc/network/interfaces. Please remove your additions to that file.
Please edit your /etc/netplan/01-netcfg.yaml file to read:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
wifis:
wlp2s0:
dhcp4: true
dhcp6: true
access-points:
"network_ssid_name":
password: "**********"
Please note that the access point name and password are enclosed in quotation marks. Also, netplan is very specific as to indentation and spacing. Please proofread carefully.
After saving the file, please do:
sudo netplan generate
sudo netplan apply
Reboot. Check to see if you connected. Do you have an IP address?
ip addr show
Are you connected?
ping -c3 www.ubuntu.com
Related videos on Youtube
user10853
Updated on September 18, 2022Comments
-
user10853 over 1 year
I installed Ubuntu 18.04 using the alternate server installer. During the installation no network interfaces were detected.
I could not figure out how to setup networking (neither ethernet nor wifi). For wired networking I have to use a usb Type-C adapter (Dell XPS 15).
Moreover, ifup/ifdown are not installed. How can I configure the network? I eventually want to install the Ubuntu-desktop. The reason I went with the alternate installer is because I wanted more control on the partitioning than the standard installer allows.
In
/etc/network/interfaces
I had added:auto eth0 iface eth0 inet dhcp auto wlp2s0 wpa-ssid <essid> wpa-psk <pass>
ip add show
shows:1: lo <LOOPBACK,UP,LOWER_UP> mtu ##### qdisq noqueue state UKNOWN group default qlen 1000 link/loopbac 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet <ip> scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host lo valid_lft forever preferred_lft forever 2: wlp2so: <BROADCAST,MULTICAST> mtu #### qdisc noop state DOWN group default qlen 1000 link/ether <mac> brd <brd>
cat /etc/netplan/*.yaml
outputs:# This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd
systemctl status systemd-networkd
reports:● systemd-networkd.service - Network Service Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:systemd-networkd.service(8)
By the way
lshw
shows:network DISABLED
-
George Udosen over 5 yearsrun
ip add show
and post the results! -
user10853 over 5 years@GeorgeUdosen I added that it shows
lo
andwkp2s0
-
George Udosen over 5 yearsIs that all it showed?
-
user10853 over 5 yearsNo. I updated it excluding addresses
-
George Udosen over 5 yearsWere there any specific error messages shown while installing as to why no interface was detected? Please run
systemctl systemd-networkd
and lets see if yournetworld
is running! -
chili555 over 5 yearsDo you wish to use wireless or ethernet? Please edit your question to add the result of the terminal command:
cat /etc/netplan/*.yaml
-
user10853 over 5 yearsI would like both. Updated with the requested results.
-
user10853 over 5 years@GeorgeUdosen
systemd-networkd
followingsystemctl
does not exist! -
George Udosen over 5 yearsMy bad it should be
systemctl status systemd-networkd
!!!! -
chili555 over 5 yearsYour
ip addr show
doesn't include ethernet. As well, we doubt that it is named eth0. Please clarify. I will propose an answer covering wireless only at this time until there are further details. -
user10853 over 5 years@chili555 probably because I do not have the adapter plugged in. The ethernet is received through the usb type-C adapter. I remember it was eth0 when I used to connect on my ubutnu desktop (on this laptop).
-
user10853 over 5 years@GeorgeUdosen updated
-
George Udosen over 5 yearsStart that service with
sudo systemctl start systemd-networkd && sudo systemctl enable systemd-networkd
-
user10853 over 5 years@GeorgeUdosen done, it's active. What then?
-
George Udosen over 5 yearsNow connect your ethernet cable and let's see how networkd handles it.
-
user10853 over 5 yearsWhen I said it is active I was referring to the wifi
wlp2s0
. Theeth0
is not shown inip addr show
as I do not have it connected (not with me right now). I will try it about 2 hours when I have it with me. -
user10853 over 5 yearsI eventually tried it. No connection.
-
-
user10853 over 5 yearsNo it does not connect. No IP
-
chili555 over 5 yearsWell, I am very embarassed! I warned about intentation and made just such a mistake myself! Please see my edit above in a few moments. After making the correction, again run:
sudo netplan generate
followed by:sudo netplan apply
Note and post any errors or warnings. Sorry for my misstep. -
user10853 over 5 yearsNo problem. I tried it but it doesn't work. I mean I don't have a connection.
-
chili555 over 5 yearsIs there any clue in the log?
dmesg | grep wlp
Please edit your question to show the result. -
user10853 over 5 yearsAfter a fresh boot I get
wlp2s0: renamed from wlan0
-
user10853 over 5 yearsI had something else in
/etc/netplan/01-netcdg.yaml
. I was testing something yesterday. After changing it backdmesg
also showswlp2s0: link is not ready
. No ip address though and ping returnsTemporary failure in name resolution
. -
chili555 over 5 yearsIt's time to dive deep. Please download and run the wireless script from here: askubuntu.com/questions/425155/… Paste the result here and give us the link: paste.ubuntu.com