MAC Address is used to identify a Network Interface Card uniquely in a layer 2 network. This address is used to transfer files between default gateway and host or computer. In this tutorial, we will learn how to find a MAC address from command-line or GUI in operating systems like Windows and Linux.
MAC地址用于在第2层网络中唯一地标识网络接口卡。 此地址用于在默认网关与主机或计算机之间传输文件。 在本教程中,我们将学习如何在Windows和Linux等操作系统中从命令行或GUI查找MAC地址。
使用Windows ipconfig命令行显示Mac地址 (Display Mac Address with Windows ipconfig Command Line)
ipconfig
command provides a lot of information about the network of the current system. We will provide /all
option in order to list detailed information like MAC address. All interfaces will be listed with their MAC addresses.
ipconfig
命令提供了大量有关当前系统网络的信息。 我们将提供/all
选项以列出诸如MAC地址之类的详细信息。 将列出所有接口及其MAC地址。
> ipconfig /all
MAC address is listen on the Physical Address
line and has value 00-0C-29-01-C1-26
which is a VMware interface.
MAC地址是在Physical Address
行上侦听的,其值00-0C-29-01-C1-26
是VMware接口。
使用Windows网络连接GUI显示Mac地址 (Display Mac Address with Windows Network Connections GUI)
Windows also provides the option to list MAC address with GUI. Use Control Panel
-> All Control Panel Items
-> Network Connections
. Then click the network interface you want to learn.
Windows还提供了使用GUI列出MAC地址的选项。 使用Control Panel
-> All Control Panel Items
-> Network Connections
。 然后单击您要学习的网络接口。
And then click Details
button which will list MAC address of this network adaptor.
然后单击Details
按钮,它将列出此网络适配器的MAC地址。
We will get following window where Physical Address
is the MAC address of the network interface.
我们将获得以下窗口,其中“ Physical Address
是网络接口的MAC地址。
使用Linux ip link命令显示Mac地址(Display Mac Address with Linux ip link Command)
Linux provides ip
command set in order to manage network interfaces and network-related issues. We can use ip with link option which will list currently available interfaces with the MAC addresses.
Linux提供ip
命令集以管理网络接口和与网络相关的问题。 我们可以使用ip with link选项,它将列出具有MAC地址的当前可用接口。
$ ip link
As we can see on the second line of the network interface information the MAC address is listed.
正如我们在网络接口信息的第二行看到的那样,列出了MAC地址。
显示Mac地址Linux ifconfig命令 (Display Mac Address Linux ifconfig Command)
ifconfig
is the old friend of the Linux system administrator. We can use ifconfig
command in order to list detailed information about the network interface like MAC address. We will also provide the network interface name which is ens33
in this case.
ifconfig
是Linux系统管理员的老朋友。 我们可以使用ifconfig
命令来列出有关网络接口的详细信息,例如MAC地址。 在这种情况下,我们还将提供网络接口名称ens33
。
$ ifconfig ens33
翻译自: https://www.poftut.com/what-is-my-mac-address-of-network-interface-on-windows-or-linux/