Modify the Ubuntu Nic name

Source: Internet
Author: User

[Email protected]:/sys/class/net$ ifconfig
ENP0S25 Link encap:ethernet HWaddr f0:de:f1:16:a4:98
Up broadcast multicast mtu:1500 metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0  (0.0 B) TX bytes:0 (0.0 B)
Interrupt:20 memory:f2500000-f2520000

Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host
Up LOOPBACK RUNNING mtu:65536 metric:1
RX packets:5843 errors:0 dropped:0 overruns:0 frame:0
TX packets:5843 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:502791 (502.7 KB) TX bytes:502791 (502.7 KB)

Wlp2s0 Link encap:ethernet HWaddr 00:26:C7:69:C2:CA
inet addr:192.168.1.3 bcast:192.168.1.255 mask:255.255.255.0
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:1002067 errors:0 dropped:0 overruns:0 frame:0
TX packets:243468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1485557749 (1.4 GB) TX bytes:25632722 (25.6 MB)

Xenbr0 Link encap:ethernet HWaddr 5a:af:ce:b3:98:ef
Inet6 ADDR:FE80::58AF:CEFF:FEB3:98EF/64 Scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:260 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0  (0.0 B) TX bytes:77345 (77.3 KB)

Xenbr0:avahi Link encap:ethernet HWaddr 5a:af:ce:b3:98:ef
inet addr:169.254.12.112 bcast:169.254.255.255 mask:255.255.0.0
Up broadcast RUNNING multicast mtu:1500 metric:1


viewing network card information
[Email protected]:/sys/class/net$ udevadm info-a-p/sys/class/net/wlp2s0

Udevadm info starts with the device specified by the Devpath and then
Walks up the chain of the parent devices. It prints for every device
Found, all possible attributes in the UDEV rules key format.
A rule to match, can is composed by the attributes of the device
And the attributes from a single parent device.

Looking at device '/DEVICES/PCI0000:00/0000:00:1C.4/0000:02:00.0/NET/WLP2S0 ':
kernel== "Wlp2s0"
subsystem== "NET"
driver== ""
attr{addr_assign_type}== "0"
attr{addr_len}== "6"
attr{address}== "00:26:C7:69:C2:CA"
attr{broadcast}== "Ff:ff:ff:ff:ff:ff"
attr{carrier}== "1"
attr{carrier_changes}== "2"
attr{dev_id}== "0x0"
attr{dev_port}== "0"
attr{dormant}== "0"
attr{flags}== "0x1003"
attr{gro_flush_timeout}== "0"
attr{ifalias}== ""
attr{ifindex}== "3"
attr{iflink}== "3"
attr{link_mode}== "1"
attr{mtu}== "1500"
attr{name_assign_type}== "4"
attr{netdev_group}== "0"
attr{operstate}== "Up"
attr{tx_queue_len}== "1000"
attr{type}== "1"

Looking at parent device '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0 ':
kernels== "0000:02:00.0"
subsystems== "PCI"
drivers== "Iwlwifi"
attrs{broken_parity_status}== "0"
attrs{class}== "0x028000"
attrs{consistent_dma_mask_bits}== "36"
attrs{d3cold_allowed}== "1"
attrs{device}== "0x0084"
attrs{dma_mask_bits}== "36"
attrs{driver_override}== "(null)"
attrs{enable}== "1"
attrs{irq}== "61"
attrs{local_cpulist}== "0-3"
attrs{local_cpus}== "F"
attrs{msi_bus}== "1"
attrs{numa_node}== "-1"
attrs{subsystem_device}== "0x1315"
attrs{subsystem_vendor}== "0x8086"
attrs{vendor}== "0x8086"

Looking at parent device '/devices/pci0000:00/0000:00:1c.4 ':
kernels== "0000:00:1c.4"
subsystems== "PCI"
drivers== "Pcieport"
attrs{broken_parity_status}== "0"
attrs{class}== "0x060400"
attrs{consistent_dma_mask_bits}== "32"
attrs{d3cold_allowed}== "0"
attrs{device}== "0X3B4A"
attrs{dma_mask_bits}== "32"
attrs{driver_override}== "(null)" [Email protected]:/sys/class/net$ udevadm info-a-p/sys/class/net/wlp2s0

Udevadm info starts with the device specified by the Devpath and then
Walks up the chain of the parent devices. It prints for every device
Found, all possible attributes in the UDEV rules key format.
A rule to match, can is composed by the attributes of the device
And the attributes from a single parent device.

Looking at device '/DEVICES/PCI0000:00/0000:00:1C.4/0000:02:00.0/NET/WLP2S0 ':
kernel== "Wlp2s0"
subsystem== "NET"
driver== ""
attr{addr_assign_type}== "0"
attr{addr_len}== "6"
attr{address}== "00:26:C7:69:C2:CA"
attr{broadcast}== "Ff:ff:ff:ff:ff:ff"
attr{carrier}== "1"
attr{carrier_changes}== "2"
attr{dev_id}== "0x0"
attr{dev_port}== "0"
attr{dormant}== "0"
attr{flags}== "0x1003"
attr{gro_flush_timeout}== "0"
attr{ifalias}== ""
attr{ifindex}== "3"
attr{iflink}== "3"
attr{link_mode}== "1"
attr{mtu}== "1500"
attr{name_assign_type}== "4"
attr{netdev_group}== "0"
attr{operstate}== "Up"
attr{tx_queue_len}== "1000"
attr{type}== "1"

Looking at parent device '/devices/pci0000:00/0000:00:1c.4/0000:02:00.0 ':
kernels== "0000:02:00.0"
subsystems== "PCI"
drivers== "Iwlwifi"
attrs{broken_parity_status}== "0"
attrs{class}== "0x028000"
attrs{consistent_dma_mask_bits}== "36"
attrs{d3cold_allowed}== "1"
attrs{device}== "0x0084"
attrs{dma_mask_bits}== "36"
attrs{driver_override}== "(null)"
attrs{enable}== "1"
attrs{irq}== "61"
attrs{local_cpulist}== "0-3"
attrs{local_cpus}== "F"
attrs{msi_bus}== "1"
attrs{numa_node}== "-1"
attrs{subsystem_device}== "0x1315"
attrs{subsystem_vendor}== "0x8086"
attrs{vendor}== "0x8086"

Looking at parent device '/devices/pci0000:00/0000:00:1c.4 ':
kernels== "0000:00:1c.4"
subsystems== "PCI"
drivers== "Pcieport"
attrs{broken_parity_status}== "0"
attrs{class}== "0x060400"
attrs{consistent_dma_mask_bits}== "32"
attrs{d3cold_allowed}== "0"
attrs{device}== "0X3B4A"
attrs{dma_mask_bits}== "32"
attrs{driver_override}== "(null)"
attrs{enable}== "1"
attrs{irq}== "20"
attrs{local_cpulist}== "0-3"
attrs{local_cpus}== "F"
attrs{msi_bus}== "1"
attrs{numa_node}== "-1"
attrs{subsystem_device}== "0x2164"
attrs{subsystem_vendor}== "0X17AA"
attrs{vendor}== "0x8086"

Looking at parent device '/devices/pci0000:00 ':
kernels== "pci0000:00"
subsystems== ""
drivers== ""


attrs{enable}== "1"
attrs{irq}== "20"
attrs{local_cpulist}== "0-3"
attrs{local_cpus}== "F"
attrs{msi_bus}== "1"
attrs{numa_node}== "-1"
attrs{subsystem_device}== "0x2164"
attrs{subsystem_vendor}== "0X17AA"
attrs{vendor}== "0x8086"

Looking at parent device '/devices/pci0000:00 ':
kernels== "pci0000:00"
subsystems== ""
drivers== ""

[Email protected]:/etc/udev/rules.d$ Touch 70-persistent-net.rules
Touch:cannot Touch ' 70-persistent-net.rules ': Permission denied
[Email protected]:/etc/udev/rules.d$ sudo touch 70-persistent-net.rules
[sudo] password for Robin:
[Email protected]:/etc/udev/rules.d$ ls
70-persistent-net.rules

[Email protected]:/etc/udev/rules.d$ cat 70-persistent-net.rules
# PCI Device WiFi
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:26:C7:69:C2:CA", attr{dev_id}== "0x0", Attr{type} = = "1", name= "WLAN"
[Email protected]:/etc/udev/rules.d$


[Email protected]:~$ ifconfig
ENP0S25 Link encap:ethernet HWaddr f0:de:f1:16:a4:98
Up broadcast multicast mtu:1500 metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0  (0.0 B) TX bytes:0 (0.0 B)
Interrupt:20 memory:f2500000-f2520000

Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host
Up LOOPBACK RUNNING mtu:65536 metric:1
RX packets:1210 errors:0 dropped:0 overruns:0 frame:0
TX packets:1210 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:107082 (107.0 KB) TX bytes:107082 (107.0 KB)

WLAN Link encap:ethernet HWaddr 00:26:C7:69:C2:CA
inet addr:192.168.1.3 bcast:192.168.1.255 mask:255.255.255.0
Inet6 ADDR:FE80::226:C7FF:FE69:C2CA/64 Scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:6057 errors:0 dropped:0 overruns:0 frame:0
TX packets:4383 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5887721 (5.8 MB) TX bytes:803304 (803.3 KB)


Modify the Ubuntu Nic name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.