[Solved] How to change wifi interface name to wlan0 from wlxe84e062e27e2

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
yamit18
Level 1
Level 1
Posts: 7
Joined: Tue Oct 08, 2019 3:31 am

[Solved] How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by yamit18 » Sat Oct 19, 2019 4:17 am

Hi
I am using linux mint 19.2 cinnamon edition . What should i do change my wifi interface name to wlan0 from wlxe84e062e27e2 when in managed mode and wlan0mon when in monitor mode.
Output from inxi -Fxz

Code: Select all

System:
  Host: yamit18 Kernel: 4.15.0-65-generic i686 bits: 32 compiler: gcc 
  v: 7.4.0 Desktop: Cinnamon 4.2.4 Distro: Linux Mint 19.2 Tina 
  base: Ubuntu 18.04 bionic 
Machine:
  Type: Laptop System: HCL Infosystems Limited product: T12Rg-H v: 1.0 
  serial: <filter> 
  Mobo: HCL Infosystems Limited model: T12Rg-H v: 1.0 serial: <filter> 
  BIOS: American Megatrends v: 205 HCL Infosyst date: 07/02/2007 
Battery:
  ID-1: BAT0 charge: 50 Wh condition: N/A model: ASUSTEK T12R 
  status: Charging 
CPU:
  Topology: Dual Core model: Intel T2080 bits: 32 type: MCP arch: M Yonah 
  rev: C L2 cache: 1024 KiB 
  flags: nx pae sse sse2 sse3 bogomips: 6916 
  Speed: 1314 MHz min/max: 798/1729 MHz Core speeds (MHz): 1: 1186 2: 1260 
Graphics:
  Device-1: AMD RC410M [Mobility Radeon Xpress 200M] vendor: ASUSTeK 
  driver: radeon v: kernel bus ID: 01:05.0 
  Display: x11 server: X.Org 1.19.6 driver: ati,radeon 
  unloaded: fbdev,modesetting,vesa resolution: 1280x800~60Hz 
  OpenGL: renderer: ATI RC410 v: 2.1 Mesa 19.0.8 direct render: Yes 
Audio:
  Device-1: AMD SBx00 Azalia vendor: ASUSTeK driver: snd_hda_intel v: kernel 
  bus ID: 00:14.2 
  Sound Server: ALSA v: k4.15.0-65-generic 
Network:
  Device-1: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter 
  driver: ath5k v: kernel port: 7800 bus ID: 02:00.0 
  IF: wlp2s0mon state: unknown mac: <filter> 
  Device-2: Realtek RTL-8100/8101L/8139 PCI Fast Ethernet Adapter 
  vendor: ASUSTeK L8400B or L3C/S notebook driver: 8139too v: 0.9.28 
  port: b800 bus ID: 08:07.0 
  IF: enp8s7 state: down mac: <filter> 
  Device-3: Realtek RTL8192CU 802.11n WLAN Adapter type: USB 
  driver: rtl8xxxu bus ID: 1-1:6 
  IF: wlxe84e062e27e2 state: up mac: <filter> 
Drives:
  Local Storage: total: 74.53 GiB used: 37.36 GiB (50.1%) 
  ID-1: /dev/sda vendor: Western Digital model: WD800BEVS-22RST0 
  size: 74.53 GiB temp: 53 C 
Partition:
  ID-1: / size: 72.86 GiB used: 37.36 GiB (51.3%) fs: ext4 dev: /dev/sda1 
Sensors:
  System Temperatures: cpu: 59.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 197 Uptime: 1h 38m Memory: 804.9 MiB used: 557.4 MiB (69.3%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.4.0 Shell: bash v: 4.4.20 
  inxi: 3.0.32 
Output from iwconfig

Code: Select all

enp8s7    no wireless extensions.

lo        no wireless extensions.

wlxe84e062e27e2  IEEE 802.11  ESSID:"Amit"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: A0:47:D7:FA:09:D3   
          Bit Rate=1 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
          Link Quality=30/70  Signal level=-80 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:221   Missed beacon:0

wlp2s0mon  IEEE 802.11  Mode:Monitor  Frequency:2.457 GHz  Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
Output from ifconfig

Code: Select all

enp8s7: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1b:fc:f3:85:a8  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 3717  bytes 319916 (319.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3717  bytes 319916 (319.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp2s0mon: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        unspec 00-15-AF-1E-D2-92-30-30-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 6149  bytes 1574842 (1.5 MB)
        RX errors 0  dropped 6149  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlxe84e062e27e2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.304  netmask 255.255.255.0  broadcast 192.168.3.255
        inet6 fe80::0056:7899:b5ac:f654  prefixlen 64  scopeid 0x20<link>
        ether e8:4e:06:2e:27:e2  txqueuelen 1000  (Ethernet)
        RX packets 6762  bytes 4356656 (4.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5559  bytes 923456 (923.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Last edited by yamit18 on Sun Oct 20, 2019 2:48 am, edited 2 times in total.

User avatar
Flemur
Level 17
Level 17
Posts: 7335
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Flemur » Sat Oct 19, 2019 8:52 am

yamit18 wrote:
Sat Oct 19, 2019 4:17 am
Hi
I am using linux mint 19.2 cinnamon edition . What should i do change my wifi interface name to wlan0 from wlxe84e062e27e2 when in managed mode and wlan0mon when in monitor mode.
It's typical of freedesktop.org to use a really handy, easy to remember name for your network!. And to provide a simple solution, like putting a preferred name in a file... (/sarcasm)

I've been meaning to fix the dopey freedesktop name, so your post prompted me to do some research: I will try the below and report back:

https://www.freedesktop.org/wiki/Softwa ... faceNames/
I don't like this, how do I disable this?
You basically have three options:

-- You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's .link file for the default policy: ln -s /dev/null /etc/systemd/network/99-default.link

-- You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.

-- You pass the net.ifnames=0 on the kernel command line
Edit - I tried the last one...(on Mint 18.3)
Ta da!

Code: Select all

$ iwconfig
wlan0     IEEE 802.11bgn ...
grub.cfg:

Code: Select all

  linux      /boot/vmlinuz-4.4.0-164-generic root=/dev/sda6 net.ifnames=0 ro
On a normal system you'd change some other file (/etc/default/grub?) and run update-grub

The wifi connection is still working without making any other changes.

Edit2: This broke the wifi while keeping the long goofy name:

Code: Select all

ln -s /dev/null /etc/systemd/network/99-default.link
Last edited by Flemur on Sat Oct 19, 2019 9:09 am, edited 2 times in total.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

User avatar
Pjotr
Level 21
Level 21
Posts: 13765
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Pjotr » Sat Oct 19, 2019 8:58 am

Flemur wrote:
Sat Oct 19, 2019 8:52 am

Code: Select all

net.ifnames=0
That looks like the easiest option.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
Flemur
Level 17
Level 17
Posts: 7335
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Flemur » Sat Oct 19, 2019 9:13 am

Pjotr wrote:
Sat Oct 19, 2019 8:58 am

Code: Select all

net.ifnames=0
That looks like the easiest option.
Yup. It works on Mint 18.3 and Mint 19.2 (Edit: and Manjaro)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

User avatar
Flemur
Level 17
Level 17
Posts: 7335
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Flemur » Sat Oct 19, 2019 10:08 am

This also works (w/Manjaro): you get the name you want and don't have to change anything else:
EDIT: DID NOT WORK on MINT 19.2 SIGH.
EDIT2: WORKS on MINT 19.2 if you put the net.ifnames=0 on the kernel line AND make or modify the /etc/systemd/network file.

To get the MAC address:

Code: Select all

ip a
The output calls the MAC address "link/ether" :
(MAC address = ) link/ether 9c:ef:d5:fd:97:98

$ cat /etc/systemd/network/10-ethusb0.link

Code: Select all

[Match]
MACAddress=9c:ef:d5:fd:97:98 

[Link]
Description=USB Wifi Adapter
Name=wifiFred
After a reboot
$ iwconfig

Code: Select all

wifiFred  IEEE 802.11  ESSID:....  
I got the format of the .link file from the Arch Linux help pages, where, unlike the useless freedesktop documentation, they were nice enough and smart enough to provide an example.
Last edited by Flemur on Sat Oct 19, 2019 12:04 pm, edited 3 times in total.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

yamit18
Level 1
Level 1
Posts: 7
Joined: Tue Oct 08, 2019 3:31 am

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by yamit18 » Sat Oct 19, 2019 10:57 am

The network folder is empty in /etc/systems/network

User avatar
Flemur
Level 17
Level 17
Posts: 7335
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Flemur » Sat Oct 19, 2019 11:28 am

yamit18 wrote:
Sat Oct 19, 2019 10:57 am
The network folder is empty in /etc/systems/network
Yup. You create the file if you want to try that method.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

yamit18
Level 1
Level 1
Posts: 7
Joined: Tue Oct 08, 2019 3:31 am

Re: How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by yamit18 » Sun Oct 20, 2019 2:46 am

The above method doesn't worked for me but I tried making a file named 70-persistent-net.rules in the directory /etc/udev/rules.d and it worked.

I wrote the following code:

Code: Select all

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e8:4e:06:2e:27:e2" , ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
In place of ATTR address write Mac address of wifi adapter.

User avatar
Pjotr
Level 21
Level 21
Posts: 13765
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: [Solved] How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Pjotr » Sun Oct 20, 2019 4:45 am

For me, this sufficed in a test:

Code: Select all

xed admin:///etc/default/grub
Added net.ifnames=0 to the existing line GRUB_CMDLINE_LINUX_DEFAULT:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash net.ifnames=0"
Saved and closed the modified file.

Then:

Code: Select all

sudo update-grub
Then reboot.

Result:

Code: Select all

pjotr@medion-akoya:~$ iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"XXXXXXX"  Nickname:"<XXXXXXXX>"
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

yamit18
Level 1
Level 1
Posts: 7
Joined: Tue Oct 08, 2019 3:31 am

Re: [Solved] How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by yamit18 » Mon Oct 21, 2019 1:06 am

Pjotr wrote:
Sun Oct 20, 2019 4:45 am
For me, this sufficed in a test:

Code: Select all

xed admin:///etc/default/grub
Added net.ifnames=0 to the existing line GRUB_CMDLINE_LINUX_DEFAULT:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash net.ifnames=0"
Saved and closed the modified file.

Then:

Code: Select all

sudo update-grub
Then reboot.

Result:

Code: Select all

pjotr@medion-akoya:~$ iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"XXXXXXX"  Nickname:"<XXXXXXXX>"
Do I only need to add net.ifnames=0 or I also have to modify the network file in /etc/systemd/network

User avatar
Pjotr
Level 21
Level 21
Posts: 13765
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: [Solved] How to change wifi interface name to wlan0 from wlxe84e062e27e2

Post by Pjotr » Mon Oct 21, 2019 2:21 am

yamit18 wrote:
Mon Oct 21, 2019 1:06 am
Pjotr wrote:
Sun Oct 20, 2019 4:45 am
For me, this sufficed in a test:

Code: Select all

xed admin:///etc/default/grub
Added net.ifnames=0 to the existing line GRUB_CMDLINE_LINUX_DEFAULT:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash net.ifnames=0"
Saved and closed the modified file.

Then:

Code: Select all

sudo update-grub
Then reboot.

Result:

Code: Select all

pjotr@medion-akoya:~$ iwconfig
lo        no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"XXXXXXX"  Nickname:"<XXXXXXXX>"
Do I only need to add net.ifnames=0
Yes.
yamit18 wrote:
Mon Oct 21, 2019 1:06 am
or I also have to modify the network file in /etc/systemd/network
No.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Post Reply

Return to “Newbie Questions”