Renaming an interface with ip link set … name … is useful when a temporary network device needs a clearer runtime label for testing, troubleshooting, or short-lived lab automation. The command is most often used on dummy, VLAN, veth, or tunnel interfaces where a descriptive name is more useful than the default one.
The ip link set dev OLDNAME name NEWNAME syntax changes the kernel-visible interface name immediately. Current ip-link(8) behavior still supports that direct rename flow, but keeping the interface down during the change avoids renaming a running device and keeps the result easier to verify.
The rename affects the running system, not the host's persistent naming policy. A reboot, declarative network config, or another naming rule can restore a different name later. Renaming the wrong interface can also break routes, firewall matches, and remote access, so the target device should be confirmed before the change.
$ ip link show dev dummy0
12: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 1e:36:04:73:34:56 brd ff:ff:ff:ff:ff:ff
$ sudo ip link set dev dummy0 down
Current ip-link(8) guidance does not recommend renaming a running interface or one that already has addresses configured.
$ sudo ip link set dev dummy0 name lab0
Renaming the active management interface on a remote host can break SSH sessions, routes, or firewall rules that still match the old device name.
$ sudo ip link set dev lab0 up
Skip this step if the interface should remain administratively down after the rename.
$ ip link show dev lab0
12: lab0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 1e:36:04:73:34:56 brd ff:ff:ff:ff:ff:ff
The old name should no longer resolve once the rename succeeds.