How to Completely Disable ‘Predictable Network Interface Names’ (Restore eth0) in Ubuntu Server

In older versions of Linux, the kernel sequentially assigned network interface names starting with eth0 for the first ethernet card, eth1 for the second, and so on. However, modern Ubuntu distributions use a system called “Predictable Network Interface Names” via systemd/udev. This system assigns complex, hardware-bound names based on the physical PCI slot or MAC address, resulting in interfaces named enp3s0 or wlp2s0.

While this prevents interfaces from swapping names if you physically move network cards around on a multi-NIC server, it is incredibly annoying for home lab users, Docker administrators, and developers writing generic bash scripts. If you write an automated deployment script that expects the network interface to be named eth0, the script will instantly crash on a modern Ubuntu server because the interface is named enp3s0. If you prefer the simplicity of the legacy naming convention and want to force your server to permanently revert to eth0, you must completely disable the Predictable Network Interface Names feature at the kernel boot level.

Disabling Predictable Names via GRUB Bootloader

To fundamentally change how the kernel handles network hardware mapping, you must pass a specific parameter directly to the bootloader.

  1. Open a Terminal session (or connect to your server via SSH).
  2. Open the primary GRUB configuration file in a text editor with root privileges:
    sudo nano /etc/default/grub
  3. Look for the line that begins with GRUB_CMDLINE_LINUX=. (It usually looks like GRUB_CMDLINE_LINUX="").
  4. You must insert two specific kernel parameters between the quotation marks: net.ifnames=0 and biosdevname=0. The line should now look exactly like this:
    GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
  5. Save the file (Ctrl + O, then Enter) and exit the text editor (Ctrl + X).
  6. Force the bootloader to compile the new configuration:
    sudo update-grub

Updating the Netplan Configuration

Before you reboot, you must update Ubuntu’s networking configuration file. If Netplan is still looking for enp3s0 upon reboot, your server will lose internet access entirely.

  1. Open your Netplan configuration file (the filename varies, but it is always in this directory):
    sudo nano /etc/netplan/*.yaml
  2. Locate the section defining your current network adapter (e.g., enp3s0:).
  3. Carefully change the interface name to eth0:. Ensure you do not change the indentation or any other settings.
  4. Save and exit the file.
  5. Reboot your server immediately: sudo reboot

Once the server comes back online, run the ip a command. You will see that the complex, unpredictable hardware identifiers have vanished, and your primary networking interface is proudly restored to the classic, universally recognized eth0 designation.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.