<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d" -->

---
title: REALLY Persistent Ethernet Interfaces on Linux | daily.dev
description: Linux's persistent device naming can break when PCIe hardware is added or removed, causing interface names like enp4 to shift to enp5. The solution is to...
canonical: https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: REALLY Persistent Ethernet Interfaces on Linux | daily.dev
og:description: Linux's persistent device naming can break when PCIe hardware is added or removed, causing interface names like enp4 to shift to enp5. The solution is to...
og:url: https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d
og:image: https://api.daily.dev/og/posts/qAlXkv58d.png
og:image:alt: REALLY Persistent Ethernet Interfaces on Linux
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# REALLY Persistent Ethernet Interfaces on Linux

**[apalrd's adventures](https://daily.dev/sources/apalrd)** · 4 min read · 0 upvotes · 0 comments

## Summary

Linux's persistent device naming can break when PCIe hardware is added or removed, causing interface names like enp4 to shift to enp5. The solution is to create custom systemd .link unit files under /etc/systemd/network/ that match interfaces by MAC address and assign a fixed, user-defined name. The file must be numbered below 99 to take priority over 99-default.link. Naming conventions matter: prefixes like enx, eno, enp, and ens are reserved by udev, so custom names like enge0 or enxg1 should be chosen carefully. After updating /etc/network/interfaces with the new names and rebooting, udev invokes systemd-link and the interfaces come up with stable, hardware-tied names regardless of PCIe topology changes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.apalrd.net/posts/2023/tip_link>

## Questions this post answers

### How do I give a Linux network interface a permanent name based on its MAC address using systemd?

Create a file like /etc/systemd/network/10-ge0.link containing a [Match] section with MACAddress and a [Link] section with Name set to your chosen name. The file must be numbered below 99 so it takes priority over 99-default.link, which applies standard persistent naming. Avoid prefixes reserved by udev: enx, eno, enp, and ens. After updating /etc/network/interfaces with the new name, reboot and udev will apply the custom name.

_Admins hardening multi-NIC Linux boxes against hardware reshuffles share configs like these on daily.dev._

### Why does my Linux Ethernet interface name change when I add or remove a PCIe card?

Standard persistent device naming uses the PCIe bus path as part of the interface name (e.g., enp4). When a new PCIe card is inserted, devices can shift positions on the bus, changing their path ID — so enp4 becomes enp5. Naming based on MAC address instead of bus path avoids this, since the MAC uniquely identifies the NIC regardless of where it sits in the PCIe topology.

_Engineers dealing with unstable interface names across hardware iterations track solutions like this on daily.dev._

## Similar posts on daily.dev

- [Kernel-only network configuration on Linux](https://daily.dev/posts/kernel-only-network-configuration-on-linux-6if7gcr3u) · Planet Python · 0 upvotes · 0 comments
- [Introduction to Linux interfaces for virtual networking](https://daily.dev/posts/introduction-to-linux-interfaces-for-virtual-networking-cct7can4a) · Red Hat Developer · 0 upvotes · 0 comments
- [I used my spare PCIe slot for something boring, and it became my favorite PC upgrade](https://daily.dev/posts/i-used-my-spare-pcie-slot-for-something-boring-and-it-became-my-favorite-pc-upgrade-rmvwpfqg8) · XDA Developers · 2 upvotes · 0 comments
- [Linux 7.0 Networking: Prepping For WiFi 8 UHR While Dropping Last Parallel Port Ethernet Driver](https://daily.dev/posts/linux-7-0-networking-prepping-for-wifi-8-uhr-while-dropping-last-parallel-port-ethernet-driver-4nieykiml) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#proxmox](https://daily.dev/tags/proxmox)

[View this post on daily.dev](https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"REALLY Persistent Ethernet Interfaces on Linux","url":"https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d"},"datePublished":"2026-08-11T08:56:33.117Z","dateModified":"2026-08-11T09:34:36.294Z","description":"Linux's persistent device naming can break when PCIe hardware is added or removed, causing interface names like enp4 to shift to enp5. The solution is to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/715d4c89c84ff45ed9467eafc42b406e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/715d4c89c84ff45ed9467eafc42b406e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"apalrd's adventures","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"apalrd's adventures","logo":"https://media.daily.dev/image/upload/s--4zkx8dRj--/f_auto,q_auto/v1786438309/logos/apalrd?_a=BAMAMicg0","url":"https://daily.dev/sources/apalrd"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,proxmox","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"apalrd's adventures","item":"https://daily.dev/sources/apalrd"},{"@type":"ListItem","position":3,"name":"REALLY Persistent Ethernet Interfaces on Linux"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/really-persistent-ethernet-interfaces-on-linux-qalxkv58d#faq","mainEntity":[{"@type":"Question","name":"How do I give a Linux network interface a permanent name based on its MAC address using systemd?","acceptedAnswer":{"@type":"Answer","text":"Create a file like /etc/systemd/network/10-ge0.link containing a [Match] section with MACAddress and a [Link] section with Name set to your chosen name. The file must be numbered below 99 so it takes priority over 99-default.link, which applies standard persistent naming. Avoid prefixes reserved by udev: enx, eno, enp, and ens. After updating /etc/network/interfaces with the new name, reboot and udev will apply the custom name. Admins hardening multi-NIC Linux boxes against hardware reshuffles share configs like these on daily.dev."}},{"@type":"Question","name":"Why does my Linux Ethernet interface name change when I add or remove a PCIe card?","acceptedAnswer":{"@type":"Answer","text":"Standard persistent device naming uses the PCIe bus path as part of the interface name (e.g., enp4). When a new PCIe card is inserted, devices can shift positions on the bus, changing their path ID — so enp4 becomes enp5. Naming based on MAC address instead of bus path avoids this, since the MAC uniquely identifies the NIC regardless of where it sits in the PCIe topology. Engineers dealing with unstable interface names across hardware iterations track solutions like this on daily.dev."}}]}
```

