Allowed chars in Linux network interface names?
The iproute2
tools do the following checks for a valid interface name:
- The name must not be empty
- The name must be less than 16 (
IFNAMSIZ
) characters - The name must not contain
/
or any whitespace characters
Using upper-case and lower-case characters are OK and names are case sensitive (e.g. if0
and IF0
are distinct).
If you want more flexibility in names, you can set an alias using ip link DEV set alias ...
. This will appear in the output of ip link show
.