How to revert USB wifi interface name (from wlxXXXXXXXXXXXX to wlanX)?Changing Network Interfaces name Ubuntu...
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
What makes the Forgotten Realms "forgotten"?
What is this metal M-shaped device for?
The vanishing of sum of coefficients: symmetric polynomials
How can I improve my fireworks photography?
"On one hand" vs "on the one hand."
Unwarranted claim of higher degree of accuracy in zircon geochronology
Issues with new Macs: Hardware makes them difficult for me to use. What options might be available in the future?
What is the best way to simulate grief?
How would one buy a used TIE Fighter or X-Wing?
Does Windows 10's telemetry include sending *.doc files if Word crashed?
How should I handle players who ignore the session zero agreement?
What do you call a fact that doesn't match the settings?
Why can a 352GB NumPy ndarray be used on an 8GB memory macOS computer?
What is the wife of a henpecked husband called?
Knowing when to use pictures over words
Is there a better way to make this?
When does coming up with an idea constitute sufficient contribution for authorship?
Why did Jodrell Bank assist the Soviet Union to collect data from their spacecraft in the mid 1960's?
Why do members of Congress in committee hearings ask witnesses the same question multiple times?
Strange Sign on Lab Door
What is better: yes / no radio, or simple checkbox?
What is the time complexity of enqueue and dequeue of a queue implemented with a singly linked list?
Am I a Rude Number?
How to revert USB wifi interface name (from wlxXXXXXXXXXXXX to wlanX)?
Changing Network Interfaces name Ubuntu 16.04Why doesn't my Wi-Fi adapter show up as wlan0 in 16.04?How to set up a new user with admin rights on a USB Ubuntu 12.04 installation?wifi usb dongle detected but no wlan interfacechange wireless interface name based on USB pointHow to bring up a network interface only if it is physically present in Ubuntu 14.04?Ubuntu 14.04 Server operated as a WIFI-LAN-Router drops packets between LAN and WIFIinstalling wireless drivers offline for ubuntu 15.10Unable to Mount 15 GB Volume (Ubuntu Studio) (USB)Can't get wifi working on Ubuntu 16.04network interfaces not running
With Ubuntu 16.04 the USB wifi interface are now wlxXXXXXXXXXXXX where the X are the digits of the device's mac adress (policy of predictable interface name)
More information about this can be find here: systemd:PredictableNetworkInterfaceNames
actually all interface naming has changed but I was able to go back to the old fashion way (ethX for ethernet interface, wlanX for inetrnal wifi card) modifying /etc/default/grub as suggested in the third post of this thread changing network interfaces name ubuntu 16-04
My problem is that this solution doesn't works for the USB interfaces and I still have this very annoying long name (i use command line a lot to play with my wifi interfaces)
So here is my question:
What should I do to disable this new rules for my USB wifi interface?
Thanks for your advices and excuse my poor english.
Bye
wireless usb systemd
|
show 3 more comments
With Ubuntu 16.04 the USB wifi interface are now wlxXXXXXXXXXXXX where the X are the digits of the device's mac adress (policy of predictable interface name)
More information about this can be find here: systemd:PredictableNetworkInterfaceNames
actually all interface naming has changed but I was able to go back to the old fashion way (ethX for ethernet interface, wlanX for inetrnal wifi card) modifying /etc/default/grub as suggested in the third post of this thread changing network interfaces name ubuntu 16-04
My problem is that this solution doesn't works for the USB interfaces and I still have this very annoying long name (i use command line a lot to play with my wifi interfaces)
So here is my question:
What should I do to disable this new rules for my USB wifi interface?
Thanks for your advices and excuse my poor english.
Bye
wireless usb systemd
Why do you want it disabled?
– Kaz Wolfe
Sep 17 '16 at 23:21
Because i use command line to manage my wifi USB interface and i use scripts that use old naming. Than we could speak hours about what I consider as a very useless systemd interface "predictable policy" but... that's not realy the point here :)
– kcdtv
Sep 17 '16 at 23:25
If you have scripts that do management and you use the same card, why not just change the scripts to use the correct (and better) names? This way you'll always know which one you're working with. If you always only have these two cards plugged in, make the script find the other card and set it up.
– Kaz Wolfe
Sep 17 '16 at 23:27
There are not better names... i will not enter in deeper considerations about this, that's really not the point here, you consider they are better but you might use your system i a way, i use it in a different way... I actually have a lot of card... but really that not the point here....
– kcdtv
Sep 17 '16 at 23:29
to answer you a little, internal interface is wlan0, first usb pluged is wlan1 second one wlan2... I always know which is which, if i am lost i just type airmon-ng to get my chipset and know which is which... always better than to type a full mac that i actually don't know and would have to iwconfig all time.... Kali linux developers did immediately revert the changes to go back to old naming and this is a distibution specialized in wifi (and other stuff), i am not the only person on earth to prefer the old naming which is simple , logical and easy to deal with. :)
– kcdtv
Sep 17 '16 at 23:41
|
show 3 more comments
With Ubuntu 16.04 the USB wifi interface are now wlxXXXXXXXXXXXX where the X are the digits of the device's mac adress (policy of predictable interface name)
More information about this can be find here: systemd:PredictableNetworkInterfaceNames
actually all interface naming has changed but I was able to go back to the old fashion way (ethX for ethernet interface, wlanX for inetrnal wifi card) modifying /etc/default/grub as suggested in the third post of this thread changing network interfaces name ubuntu 16-04
My problem is that this solution doesn't works for the USB interfaces and I still have this very annoying long name (i use command line a lot to play with my wifi interfaces)
So here is my question:
What should I do to disable this new rules for my USB wifi interface?
Thanks for your advices and excuse my poor english.
Bye
wireless usb systemd
With Ubuntu 16.04 the USB wifi interface are now wlxXXXXXXXXXXXX where the X are the digits of the device's mac adress (policy of predictable interface name)
More information about this can be find here: systemd:PredictableNetworkInterfaceNames
actually all interface naming has changed but I was able to go back to the old fashion way (ethX for ethernet interface, wlanX for inetrnal wifi card) modifying /etc/default/grub as suggested in the third post of this thread changing network interfaces name ubuntu 16-04
My problem is that this solution doesn't works for the USB interfaces and I still have this very annoying long name (i use command line a lot to play with my wifi interfaces)
So here is my question:
What should I do to disable this new rules for my USB wifi interface?
Thanks for your advices and excuse my poor english.
Bye
wireless usb systemd
wireless usb systemd
edited Apr 13 '17 at 12:23
Community♦
1
1
asked Sep 17 '16 at 22:55
kcdtvkcdtv
619815
619815
Why do you want it disabled?
– Kaz Wolfe
Sep 17 '16 at 23:21
Because i use command line to manage my wifi USB interface and i use scripts that use old naming. Than we could speak hours about what I consider as a very useless systemd interface "predictable policy" but... that's not realy the point here :)
– kcdtv
Sep 17 '16 at 23:25
If you have scripts that do management and you use the same card, why not just change the scripts to use the correct (and better) names? This way you'll always know which one you're working with. If you always only have these two cards plugged in, make the script find the other card and set it up.
– Kaz Wolfe
Sep 17 '16 at 23:27
There are not better names... i will not enter in deeper considerations about this, that's really not the point here, you consider they are better but you might use your system i a way, i use it in a different way... I actually have a lot of card... but really that not the point here....
– kcdtv
Sep 17 '16 at 23:29
to answer you a little, internal interface is wlan0, first usb pluged is wlan1 second one wlan2... I always know which is which, if i am lost i just type airmon-ng to get my chipset and know which is which... always better than to type a full mac that i actually don't know and would have to iwconfig all time.... Kali linux developers did immediately revert the changes to go back to old naming and this is a distibution specialized in wifi (and other stuff), i am not the only person on earth to prefer the old naming which is simple , logical and easy to deal with. :)
– kcdtv
Sep 17 '16 at 23:41
|
show 3 more comments
Why do you want it disabled?
– Kaz Wolfe
Sep 17 '16 at 23:21
Because i use command line to manage my wifi USB interface and i use scripts that use old naming. Than we could speak hours about what I consider as a very useless systemd interface "predictable policy" but... that's not realy the point here :)
– kcdtv
Sep 17 '16 at 23:25
If you have scripts that do management and you use the same card, why not just change the scripts to use the correct (and better) names? This way you'll always know which one you're working with. If you always only have these two cards plugged in, make the script find the other card and set it up.
– Kaz Wolfe
Sep 17 '16 at 23:27
There are not better names... i will not enter in deeper considerations about this, that's really not the point here, you consider they are better but you might use your system i a way, i use it in a different way... I actually have a lot of card... but really that not the point here....
– kcdtv
Sep 17 '16 at 23:29
to answer you a little, internal interface is wlan0, first usb pluged is wlan1 second one wlan2... I always know which is which, if i am lost i just type airmon-ng to get my chipset and know which is which... always better than to type a full mac that i actually don't know and would have to iwconfig all time.... Kali linux developers did immediately revert the changes to go back to old naming and this is a distibution specialized in wifi (and other stuff), i am not the only person on earth to prefer the old naming which is simple , logical and easy to deal with. :)
– kcdtv
Sep 17 '16 at 23:41
Why do you want it disabled?
– Kaz Wolfe
Sep 17 '16 at 23:21
Why do you want it disabled?
– Kaz Wolfe
Sep 17 '16 at 23:21
Because i use command line to manage my wifi USB interface and i use scripts that use old naming. Than we could speak hours about what I consider as a very useless systemd interface "predictable policy" but... that's not realy the point here :)
– kcdtv
Sep 17 '16 at 23:25
Because i use command line to manage my wifi USB interface and i use scripts that use old naming. Than we could speak hours about what I consider as a very useless systemd interface "predictable policy" but... that's not realy the point here :)
– kcdtv
Sep 17 '16 at 23:25
If you have scripts that do management and you use the same card, why not just change the scripts to use the correct (and better) names? This way you'll always know which one you're working with. If you always only have these two cards plugged in, make the script find the other card and set it up.
– Kaz Wolfe
Sep 17 '16 at 23:27
If you have scripts that do management and you use the same card, why not just change the scripts to use the correct (and better) names? This way you'll always know which one you're working with. If you always only have these two cards plugged in, make the script find the other card and set it up.
– Kaz Wolfe
Sep 17 '16 at 23:27
There are not better names... i will not enter in deeper considerations about this, that's really not the point here, you consider they are better but you might use your system i a way, i use it in a different way... I actually have a lot of card... but really that not the point here....
– kcdtv
Sep 17 '16 at 23:29
There are not better names... i will not enter in deeper considerations about this, that's really not the point here, you consider they are better but you might use your system i a way, i use it in a different way... I actually have a lot of card... but really that not the point here....
– kcdtv
Sep 17 '16 at 23:29
to answer you a little, internal interface is wlan0, first usb pluged is wlan1 second one wlan2... I always know which is which, if i am lost i just type airmon-ng to get my chipset and know which is which... always better than to type a full mac that i actually don't know and would have to iwconfig all time.... Kali linux developers did immediately revert the changes to go back to old naming and this is a distibution specialized in wifi (and other stuff), i am not the only person on earth to prefer the old naming which is simple , logical and easy to deal with. :)
– kcdtv
Sep 17 '16 at 23:41
to answer you a little, internal interface is wlan0, first usb pluged is wlan1 second one wlan2... I always know which is which, if i am lost i just type airmon-ng to get my chipset and know which is which... always better than to type a full mac that i actually don't know and would have to iwconfig all time.... Kali linux developers did immediately revert the changes to go back to old naming and this is a distibution specialized in wifi (and other stuff), i am not the only person on earth to prefer the old naming which is simple , logical and easy to deal with. :)
– kcdtv
Sep 17 '16 at 23:41
|
show 3 more comments
4 Answers
4
active
oldest
votes
You missed one thing from https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
Then reboot
I think it needs to be the 80-net-setup-link.rules file in /etc/udev/ as the one laptop I updated to Ubuntu 16.04 from 15.10 still contained a file named /lib/udev/rules.d/73-usb-net-by-mac.rules and it contained
# Use MAC based names for network interfaces which are directly or indirectly
on USB and have an universally administered (stable) MAC address (second bit
is 0).
IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/dev/null", GOTO="usb_net_by_mac_end"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="",
ATTR{address}=="?[014589cd]:*",
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
LABEL="usb_net_by_mac_end"
And it specifies /etc/udev/rules.d/80-net-setup-link.rules
This file does not exist in any of my clean installs of Ubuntu 16.04 but part of this must exist in other source code
1
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
add a comment |
I have ubuntu studio and had the same problem: a long wlxxxxx name AND the wifi connected but NOT WORKING !
Ubuntu studio has a special low latency kernel and I suspected that the long name could be a problem.
So, I rename it to wlan0 inspired by this thread. I did the following:
1) copied the /lib/udev/rules.d/80-net-setup-link.rules to the folder /etc/udev/rules.d/
2) edited the name there. In my case there was a line:
NAME=="", ENV{ID_NET_NAME}!="",NAME="$env{ID_NET_NAME}"
I just put "wlan0" instead of "$env{ID_NET_NAME}".
And now wifi WORKS !
GR
add a comment |
Instead of completely disabling the renaming you can override it to give your interfaces your own custom names. That keeps the static naming, but gives you a name you can remember and type in.
The existing naming system (/lib/udev/rules.d/80-net-setup-link.rules
) only renames an interface if it hasn't already been given a name. So you can add your own rules at a higher priority in /etc/udev/rules.d
which names the interfaces in your own way, which then stops the default system from naming those interfaces.
I have the file 70-wifi.rules
in my system which names the interfaces according to the network they are connected to:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0f:00:4a:c4:c9", NAME="wifi-root"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:19:86:31:dd:b7", NAME="wifi-main"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="38:2c:4a:48:27:49", NAME="wifi-local"
It's keyed by the MAC address of the interface, and results in:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 3c:d9:2b:73:ad:5d brd ff:ff:ff:ff:ff:ff
15: wifi-main: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:19:86:31:dd:b7 brd ff:ff:ff:ff:ff:ff
16: wifi-local: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 38:2c:4a:48:27:49 brd ff:ff:ff:ff:ff:ff
17: wifi-root: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:0f:00:4a:c4:c9 brd ff:ff:ff:ff:ff:ff
You could rename them wlan0, wlan1, etc. The beauty of this method is you get the names you want, and you benefit from static network interface naming. So the interfaces will always be named the same thing.
add a comment |
A note for those looking for a similar use-case:
I had a problem with a USB WiFi dongle's driver unable to authenticate because of a rather long interface name in Debian (stretch).
Steps for resolution:
copied
/lib/udev/rules.d/80-net-setup-link.rules
to/etc/udev/rules.d/
changed
$env{ID_NET_NAME}
to$env{ID_NET_SLOT}
This maintained the uniqueness of the interface name while shortening it.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f826325%2fhow-to-revert-usb-wifi-interface-name-from-wlxxxxxxxxxxxxx-to-wlanx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
You missed one thing from https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
Then reboot
I think it needs to be the 80-net-setup-link.rules file in /etc/udev/ as the one laptop I updated to Ubuntu 16.04 from 15.10 still contained a file named /lib/udev/rules.d/73-usb-net-by-mac.rules and it contained
# Use MAC based names for network interfaces which are directly or indirectly
on USB and have an universally administered (stable) MAC address (second bit
is 0).
IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/dev/null", GOTO="usb_net_by_mac_end"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="",
ATTR{address}=="?[014589cd]:*",
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
LABEL="usb_net_by_mac_end"
And it specifies /etc/udev/rules.d/80-net-setup-link.rules
This file does not exist in any of my clean installs of Ubuntu 16.04 but part of this must exist in other source code
1
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
add a comment |
You missed one thing from https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
Then reboot
I think it needs to be the 80-net-setup-link.rules file in /etc/udev/ as the one laptop I updated to Ubuntu 16.04 from 15.10 still contained a file named /lib/udev/rules.d/73-usb-net-by-mac.rules and it contained
# Use MAC based names for network interfaces which are directly or indirectly
on USB and have an universally administered (stable) MAC address (second bit
is 0).
IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/dev/null", GOTO="usb_net_by_mac_end"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="",
ATTR{address}=="?[014589cd]:*",
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
LABEL="usb_net_by_mac_end"
And it specifies /etc/udev/rules.d/80-net-setup-link.rules
This file does not exist in any of my clean installs of Ubuntu 16.04 but part of this must exist in other source code
1
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
add a comment |
You missed one thing from https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
Then reboot
I think it needs to be the 80-net-setup-link.rules file in /etc/udev/ as the one laptop I updated to Ubuntu 16.04 from 15.10 still contained a file named /lib/udev/rules.d/73-usb-net-by-mac.rules and it contained
# Use MAC based names for network interfaces which are directly or indirectly
on USB and have an universally administered (stable) MAC address (second bit
is 0).
IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/dev/null", GOTO="usb_net_by_mac_end"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="",
ATTR{address}=="?[014589cd]:*",
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
LABEL="usb_net_by_mac_end"
And it specifies /etc/udev/rules.d/80-net-setup-link.rules
This file does not exist in any of my clean installs of Ubuntu 16.04 but part of this must exist in other source code
You missed one thing from https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
sudo ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
Then reboot
I think it needs to be the 80-net-setup-link.rules file in /etc/udev/ as the one laptop I updated to Ubuntu 16.04 from 15.10 still contained a file named /lib/udev/rules.d/73-usb-net-by-mac.rules and it contained
# Use MAC based names for network interfaces which are directly or indirectly
on USB and have an universally administered (stable) MAC address (second bit
is 0).
IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
PROGRAM="/bin/readlink /etc/udev/rules.d/80-net-setup-link.rules", RESULT=="/dev/null", GOTO="usb_net_by_mac_end"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="",
ATTR{address}=="?[014589cd]:*",
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"
LABEL="usb_net_by_mac_end"
And it specifies /etc/udev/rules.d/80-net-setup-link.rules
This file does not exist in any of my clean installs of Ubuntu 16.04 but part of this must exist in other source code
edited Sep 19 '16 at 22:17
answered Sep 18 '16 at 17:12
Jeremy31Jeremy31
8,48221367
8,48221367
1
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
add a comment |
1
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
1
1
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
Hi Jeremy31 and thank you for you answer
– kcdtv
Sep 19 '16 at 16:36
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
. My /etc/udev/rules.d/ directory is empty. I have a 80-net-setup-link.rules in /lib/udev/rules.d. I did the same than suggested in this directory but the USB wifi device is still named with the mac address. I'll try to find a way and would update when i find something... thanks again
– kcdtv
Sep 19 '16 at 17:08
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
Just do it to /etc/udev/rules.d/80-net-setup-link.rules as I just checked my ubuntu 16.04 machine and plugging in an older USB wifi device shows it as wlan1 in iwconfig. I am not sure why the net.ifnames=0 in the grub file is not enough to keep it from changing USB devices
– Jeremy31
Sep 19 '16 at 21:55
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
It worked! I copied the rule 80 from /lib/udev/rules.d to /etc/udev/rules.d. Than I duplicated it in this directory, renaming it 80-net-setup-link.rules.bak. And I finally created the symlink to /dev/null_. After reboot my USB WiFi card does not show up now as "wlan1" interface. Thank you very much! :)
– kcdtv
Sep 20 '16 at 14:34
add a comment |
I have ubuntu studio and had the same problem: a long wlxxxxx name AND the wifi connected but NOT WORKING !
Ubuntu studio has a special low latency kernel and I suspected that the long name could be a problem.
So, I rename it to wlan0 inspired by this thread. I did the following:
1) copied the /lib/udev/rules.d/80-net-setup-link.rules to the folder /etc/udev/rules.d/
2) edited the name there. In my case there was a line:
NAME=="", ENV{ID_NET_NAME}!="",NAME="$env{ID_NET_NAME}"
I just put "wlan0" instead of "$env{ID_NET_NAME}".
And now wifi WORKS !
GR
add a comment |
I have ubuntu studio and had the same problem: a long wlxxxxx name AND the wifi connected but NOT WORKING !
Ubuntu studio has a special low latency kernel and I suspected that the long name could be a problem.
So, I rename it to wlan0 inspired by this thread. I did the following:
1) copied the /lib/udev/rules.d/80-net-setup-link.rules to the folder /etc/udev/rules.d/
2) edited the name there. In my case there was a line:
NAME=="", ENV{ID_NET_NAME}!="",NAME="$env{ID_NET_NAME}"
I just put "wlan0" instead of "$env{ID_NET_NAME}".
And now wifi WORKS !
GR
add a comment |
I have ubuntu studio and had the same problem: a long wlxxxxx name AND the wifi connected but NOT WORKING !
Ubuntu studio has a special low latency kernel and I suspected that the long name could be a problem.
So, I rename it to wlan0 inspired by this thread. I did the following:
1) copied the /lib/udev/rules.d/80-net-setup-link.rules to the folder /etc/udev/rules.d/
2) edited the name there. In my case there was a line:
NAME=="", ENV{ID_NET_NAME}!="",NAME="$env{ID_NET_NAME}"
I just put "wlan0" instead of "$env{ID_NET_NAME}".
And now wifi WORKS !
GR
I have ubuntu studio and had the same problem: a long wlxxxxx name AND the wifi connected but NOT WORKING !
Ubuntu studio has a special low latency kernel and I suspected that the long name could be a problem.
So, I rename it to wlan0 inspired by this thread. I did the following:
1) copied the /lib/udev/rules.d/80-net-setup-link.rules to the folder /etc/udev/rules.d/
2) edited the name there. In my case there was a line:
NAME=="", ENV{ID_NET_NAME}!="",NAME="$env{ID_NET_NAME}"
I just put "wlan0" instead of "$env{ID_NET_NAME}".
And now wifi WORKS !
GR
answered Nov 18 '17 at 7:03
mchrgr2000mchrgr2000
313
313
add a comment |
add a comment |
Instead of completely disabling the renaming you can override it to give your interfaces your own custom names. That keeps the static naming, but gives you a name you can remember and type in.
The existing naming system (/lib/udev/rules.d/80-net-setup-link.rules
) only renames an interface if it hasn't already been given a name. So you can add your own rules at a higher priority in /etc/udev/rules.d
which names the interfaces in your own way, which then stops the default system from naming those interfaces.
I have the file 70-wifi.rules
in my system which names the interfaces according to the network they are connected to:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0f:00:4a:c4:c9", NAME="wifi-root"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:19:86:31:dd:b7", NAME="wifi-main"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="38:2c:4a:48:27:49", NAME="wifi-local"
It's keyed by the MAC address of the interface, and results in:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 3c:d9:2b:73:ad:5d brd ff:ff:ff:ff:ff:ff
15: wifi-main: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:19:86:31:dd:b7 brd ff:ff:ff:ff:ff:ff
16: wifi-local: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 38:2c:4a:48:27:49 brd ff:ff:ff:ff:ff:ff
17: wifi-root: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:0f:00:4a:c4:c9 brd ff:ff:ff:ff:ff:ff
You could rename them wlan0, wlan1, etc. The beauty of this method is you get the names you want, and you benefit from static network interface naming. So the interfaces will always be named the same thing.
add a comment |
Instead of completely disabling the renaming you can override it to give your interfaces your own custom names. That keeps the static naming, but gives you a name you can remember and type in.
The existing naming system (/lib/udev/rules.d/80-net-setup-link.rules
) only renames an interface if it hasn't already been given a name. So you can add your own rules at a higher priority in /etc/udev/rules.d
which names the interfaces in your own way, which then stops the default system from naming those interfaces.
I have the file 70-wifi.rules
in my system which names the interfaces according to the network they are connected to:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0f:00:4a:c4:c9", NAME="wifi-root"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:19:86:31:dd:b7", NAME="wifi-main"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="38:2c:4a:48:27:49", NAME="wifi-local"
It's keyed by the MAC address of the interface, and results in:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 3c:d9:2b:73:ad:5d brd ff:ff:ff:ff:ff:ff
15: wifi-main: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:19:86:31:dd:b7 brd ff:ff:ff:ff:ff:ff
16: wifi-local: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 38:2c:4a:48:27:49 brd ff:ff:ff:ff:ff:ff
17: wifi-root: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:0f:00:4a:c4:c9 brd ff:ff:ff:ff:ff:ff
You could rename them wlan0, wlan1, etc. The beauty of this method is you get the names you want, and you benefit from static network interface naming. So the interfaces will always be named the same thing.
add a comment |
Instead of completely disabling the renaming you can override it to give your interfaces your own custom names. That keeps the static naming, but gives you a name you can remember and type in.
The existing naming system (/lib/udev/rules.d/80-net-setup-link.rules
) only renames an interface if it hasn't already been given a name. So you can add your own rules at a higher priority in /etc/udev/rules.d
which names the interfaces in your own way, which then stops the default system from naming those interfaces.
I have the file 70-wifi.rules
in my system which names the interfaces according to the network they are connected to:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0f:00:4a:c4:c9", NAME="wifi-root"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:19:86:31:dd:b7", NAME="wifi-main"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="38:2c:4a:48:27:49", NAME="wifi-local"
It's keyed by the MAC address of the interface, and results in:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 3c:d9:2b:73:ad:5d brd ff:ff:ff:ff:ff:ff
15: wifi-main: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:19:86:31:dd:b7 brd ff:ff:ff:ff:ff:ff
16: wifi-local: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 38:2c:4a:48:27:49 brd ff:ff:ff:ff:ff:ff
17: wifi-root: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:0f:00:4a:c4:c9 brd ff:ff:ff:ff:ff:ff
You could rename them wlan0, wlan1, etc. The beauty of this method is you get the names you want, and you benefit from static network interface naming. So the interfaces will always be named the same thing.
Instead of completely disabling the renaming you can override it to give your interfaces your own custom names. That keeps the static naming, but gives you a name you can remember and type in.
The existing naming system (/lib/udev/rules.d/80-net-setup-link.rules
) only renames an interface if it hasn't already been given a name. So you can add your own rules at a higher priority in /etc/udev/rules.d
which names the interfaces in your own way, which then stops the default system from naming those interfaces.
I have the file 70-wifi.rules
in my system which names the interfaces according to the network they are connected to:
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0f:00:4a:c4:c9", NAME="wifi-root"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:19:86:31:dd:b7", NAME="wifi-main"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="38:2c:4a:48:27:49", NAME="wifi-local"
It's keyed by the MAC address of the interface, and results in:
$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 3c:d9:2b:73:ad:5d brd ff:ff:ff:ff:ff:ff
15: wifi-main: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:19:86:31:dd:b7 brd ff:ff:ff:ff:ff:ff
16: wifi-local: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 38:2c:4a:48:27:49 brd ff:ff:ff:ff:ff:ff
17: wifi-root: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:0f:00:4a:c4:c9 brd ff:ff:ff:ff:ff:ff
You could rename them wlan0, wlan1, etc. The beauty of this method is you get the names you want, and you benefit from static network interface naming. So the interfaces will always be named the same thing.
answered Aug 9 '18 at 16:09
MajenkoMajenko
369110
369110
add a comment |
add a comment |
A note for those looking for a similar use-case:
I had a problem with a USB WiFi dongle's driver unable to authenticate because of a rather long interface name in Debian (stretch).
Steps for resolution:
copied
/lib/udev/rules.d/80-net-setup-link.rules
to/etc/udev/rules.d/
changed
$env{ID_NET_NAME}
to$env{ID_NET_SLOT}
This maintained the uniqueness of the interface name while shortening it.
New contributor
add a comment |
A note for those looking for a similar use-case:
I had a problem with a USB WiFi dongle's driver unable to authenticate because of a rather long interface name in Debian (stretch).
Steps for resolution:
copied
/lib/udev/rules.d/80-net-setup-link.rules
to/etc/udev/rules.d/
changed
$env{ID_NET_NAME}
to$env{ID_NET_SLOT}
This maintained the uniqueness of the interface name while shortening it.
New contributor
add a comment |
A note for those looking for a similar use-case:
I had a problem with a USB WiFi dongle's driver unable to authenticate because of a rather long interface name in Debian (stretch).
Steps for resolution:
copied
/lib/udev/rules.d/80-net-setup-link.rules
to/etc/udev/rules.d/
changed
$env{ID_NET_NAME}
to$env{ID_NET_SLOT}
This maintained the uniqueness of the interface name while shortening it.
New contributor
A note for those looking for a similar use-case:
I had a problem with a USB WiFi dongle's driver unable to authenticate because of a rather long interface name in Debian (stretch).
Steps for resolution:
copied
/lib/udev/rules.d/80-net-setup-link.rules
to/etc/udev/rules.d/
changed
$env{ID_NET_NAME}
to$env{ID_NET_SLOT}
This maintained the uniqueness of the interface name while shortening it.
New contributor
New contributor
answered 31 mins ago
Code MaverickCode Maverick
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f826325%2fhow-to-revert-usb-wifi-interface-name-from-wlxxxxxxxxxxxxx-to-wlanx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why do you want it disabled?
– Kaz Wolfe
Sep 17 '16 at 23:21
Because i use command line to manage my wifi USB interface and i use scripts that use old naming. Than we could speak hours about what I consider as a very useless systemd interface "predictable policy" but... that's not realy the point here :)
– kcdtv
Sep 17 '16 at 23:25
If you have scripts that do management and you use the same card, why not just change the scripts to use the correct (and better) names? This way you'll always know which one you're working with. If you always only have these two cards plugged in, make the script find the other card and set it up.
– Kaz Wolfe
Sep 17 '16 at 23:27
There are not better names... i will not enter in deeper considerations about this, that's really not the point here, you consider they are better but you might use your system i a way, i use it in a different way... I actually have a lot of card... but really that not the point here....
– kcdtv
Sep 17 '16 at 23:29
to answer you a little, internal interface is wlan0, first usb pluged is wlan1 second one wlan2... I always know which is which, if i am lost i just type airmon-ng to get my chipset and know which is which... always better than to type a full mac that i actually don't know and would have to iwconfig all time.... Kali linux developers did immediately revert the changes to go back to old naming and this is a distibution specialized in wifi (and other stuff), i am not the only person on earth to prefer the old naming which is simple , logical and easy to deal with. :)
– kcdtv
Sep 17 '16 at 23:41