HOWTO: rename a USB WiFi from wlx2c0547xxxxxx to wlan0

I found this, which I did not know, and thought it might be of interest to others:

The summary would be find out your WiFi cards current MAC address (2c:05:47:xx:xx:xx) with either:

$ /sbin/ifconfig -a
$ sudo ip link

If either command is missing you can install it on Debian with the following respectively:

$ sudo apt install net-tools
$ sudo apt install iproute2

Once you have the MAC address of your WiFi
Create a new USB device rules file using either of the following commands
$ sudo vi /etc/udev/rules.d/70-persistent-net.rules
$ sudo nano /etc/udev/rules.d/70-persistent-net.rules
And add lines like the following if you had two USB WiFi cards and wanted one called wlan0 and the other p2p1 (obviously changing the mac address to be your MAC address, and deleting the other line if you only have one USB WiFi card):

# Add the following "2c:05:47:a1:16:fa" and "2c:05:47:a1:16:fb" as the real addresses you just got
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="? *", ATTR{address}=="2c:05:47:a1:16:fa", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="wlan0" 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="? *", ATTR{address}=="2c:05:47:a1:16:fb", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="p2p1"

Update the udev (USB Device) rules
sudo udevadm control --reload-rules