How to rename wired network device?

Hi, my TX1 wired network card is like as enx00044b7abbds in Ubuntu16.04, and I want to change enxXXX to eth0 or eth1. Will you please give some advises? Thanks a lot!

The mechanism for renaming in Linux is handled by udev, and generally speaking, you will find related configuration customization in “/etc/udev/” (usually there will be an addition of something such as “/etc/udev/rules.d/70-persistent-net.rules”). If you wish to override behavior you would typically create “/etc/udev/rules.d/70-persistent-net.rules”.

Note that often there will be a series of rules available in “/lib/udev/rules.d/”, and the “/etc/udev/rules.d/” may have symbolic links to those rules…or the rule may be copied from “/lib/”, then edited in “/etc/”…rules in “/etc/” are for customization edits, rules in “/lib/” should not be touched. Any rule in “/etc/” will not be overwritten by package updates, rules in “/lib/” may be overwritten by a package update.

Also you may want to consider that the NetworkManager tool complicates life and the rule used can depend on whether NetworkManager is used to manage that device, or if something else manages the device. It is common for there to be a mix of devices where some are managed by NetworkManager, and some are not. Files in udev directories with the “-nm-” naming convention are probably for NetworkManager.

I am not where I can check my TX1 right now, but on my TX2 (which I have edited files to use a static IP and not use DHCP) my wired connection is already eth0. I’m not sure which file rewires things for the enp or enx notation, but this may depend on whether NetworkManager is used or not.

EDIT: I see that if “/lib/udev/write_net_rules” exists, then this might be related. I suggest that if you have this file (my system does not), then research this file for package owning it, along with researching what a custom “/etc/udev/rules.d/70-persistent-net.rules” might use to overwrite this file.

Does this happen on rel-28.1? Did you try something that would modify udev?