| 1 |
.TH NAMEIF 8 "2025-09-10" "net\-tools" "Linux System Administrator's Manual" |
| 2 |
|
| 3 |
.SH NAME |
| 4 |
nameif \- name network interfaces based on MAC addresses |
| 5 |
|
| 6 |
.SH SYNOPSIS |
| 7 |
.B nameif |
| 8 |
.RB [ \-c |
| 9 |
.IR configfile ] |
| 10 |
.RB [ \-s ] |
| 11 |
.br |
| 12 |
.B nameif |
| 13 |
.RB [ \-c |
| 14 |
.IR configfile ] |
| 15 |
.RB [ \-s ] |
| 16 |
.I "interface macaddress" |
| 17 |
|
| 18 |
.SH DESCRIPTION |
| 19 |
.B nameif |
| 20 |
renames network interfaces based on mac addresses. |
| 21 |
When no arguments are given |
| 22 |
.I /etc/mactab |
| 23 |
is read. |
| 24 |
Each line of it contains an interface name and a Ethernet MAC address. |
| 25 |
Comments are allowed starting with \fB#\fR. |
| 26 |
Otherwise the interfaces specified on the command line are processed. |
| 27 |
.B nameif |
| 28 |
looks for the interface with the given MAC address and renames it |
| 29 |
to the name given. |
| 30 |
|
| 31 |
When the |
| 32 |
.B \-s |
| 33 |
argument is given all error messages go to the syslog. |
| 34 |
|
| 35 |
When the |
| 36 |
.B \-c |
| 37 |
argument is given with a file name that file is read instead of |
| 38 |
.IR /etc/mactab . |
| 39 |
|
| 40 |
.SH NOTES |
| 41 |
.B nameif |
| 42 |
should be run before the interface is up, otherwise it'll fail. |
| 43 |
|
| 44 |
.SH FILES |
| 45 |
.I /etc/mactab |
| 46 |
|
| 47 |
.SH BUGS |
| 48 |
Only works for Ethernet hardware address types. |
| 49 |
|
| 50 |
More modern alias name functions are available with the |
| 51 |
.BR ip (8) |
| 52 |
command or management frameworks like |
| 53 |
.BR udev (5) |
| 54 |
or |
| 55 |
.BR netplan (5). |
| 56 |
|
| 57 |
.SH SEE AlSO |
| 58 |
Homepage of the \fInet\-tools\fP project: |
| 59 |
.UR https://net-tools.sourceforge.io |
| 60 |
.UE |
| 61 |
|
| 62 |
.P |
| 63 |
.BR ifconfig (8), |
| 64 |
.BR ip (8) |
| 65 |
.br |
| 66 |
.BR netplan (5), |
| 67 |
.BR udev (5) |