Enable Ehternet
This guide provides steps to enable the Ethernet interface (enp8s0
) and use it instead of the Wi-Fi interface (wlp2s0
) on Ubuntu Server 24.04.
Steps to Enable Ethernet and Switch from Wi-Fi
Verify Ethernet Interface Status Run the following command to confirm the current network interfaces:
You should see
enp8s0
(Ethernet) andwlp2s0
(Wi-Fi). Note the state ofenp8s0
(likelyDOWN
). Your devices may be different based on the hardware.Enable the Ethernet Interface Bring the Ethernet interface up:
This enables the interface, but it still needs an IP address.
Configure Ethernet to Use DHCP Ubuntu Server 24.04 uses Netplan for network configuration. Check if the Ethernet interface is configured in the Netplan configuration file, typically located at
/etc/netplan/
.List the Netplan configuration files:
You’ll likely see a file like
00-installer-config.yaml
or01-netcfg.yaml
.Edit the Netplan configuration file (e.g.,
00-installer-config.yaml
) using a text editor likenano
:Ensure the file includes the Ethernet interface (
enp8s0
) configured for DHCP. A typical configuration might look like this:Modify the file to prioritize Ethernet and optionally disable Wi-Fi. For example:
dhcp4: true
enables DHCP for the Ethernet interface.dhcp4: false
disables DHCP for Wi-Fi (effectively disabling it).optional: true
ensures the system doesn’t wait for Wi-Fi during boot.
Save the file (Ctrl+O, then Ctrl+X in
nano
).Apply the Netplan Configuration Apply the changes with:
This will restart the network services and configure the Ethernet interface.
Verify Ethernet Connectivity Check if the Ethernet interface has received an IP address:
Look for an IP address under
inet
(e.g.,192.168.x.x
). If no IP is assigned, ensure the Ethernet cable is connected and the router’s DHCP server is active.Test connectivity:
If successful, the Ethernet interface is working.
Disable Wi-Fi (Optional) If you want to ensure Wi-Fi is fully disabled, bring the interface down:
The Netplan configuration above (
dhcp4: false
) should prevent Wi-Fi from reconnecting after a reboot.Check Network Status Verify the overall network status:
You should see
enp8s0
asconfigured
andwlp2s0
asoff
orunmanaged
.
Last updated