mac os修改mac地址_如何在OS X上查找和更改您的MAC地址

时间:2024-04-06 07:49:25
mac os修改mac地址_如何在OS X上查找和更改您的MAC地址

mac os修改mac地址

mac os修改mac地址_如何在OS X上查找和更改您的MAC地址

Each network card on your computer has a built-in unique MAC (Media Access Control) address that can be used to identify your computer. This is usually fine, but it is possible to change it natively in OS X.

您计算机上的每个网卡都有一个内置的唯一MAC(媒体访问控制)地址,可用于识别您的计算机。 通常这很好,但是可以在OS X中本地更改它。

If you are running Windows or Linux you can change your MAC address easily on those platforms as well, though we should note that this is more of an advanced topic and most people shouldn’t change their MAC addresses unless they really need to.

如果您正在运行Windows或Linux,则也可以在那些平台上轻松更改MAC地址 ,尽管我们应该注意,这更多是一个高级主题,大多数人除非真正需要,否则不应该更改其MAC地址。

如何找到您的MAC地址 (How to find your MAC Address)

OS X provides a quick and easy way to find your MAC address. Just hold down the Option key and click the Wi-Fi icon in the menu bar:

OS X提供了一种快速简便的方法来查找您的MAC地址。 只需按住Option键,然后单击菜单栏中的Wi-Fi图标:

mac os修改mac地址_如何在OS X上查找和更改您的MAC地址

The ‘Address’ portion with all the colons is your MAC address. This is your physical MAC address, which for most people is the address you want. However, if your address has been changed, you can check what address your computer is actually using to communicate with by firing up a Terminal and running:

所有冒号的“地址”部分是您的MAC地址。 这是你的身体   MAC地址,对于大多数人来说,这就是您想要的地址。 但是,如果您的地址已更改,则可以通过启动终端并运行以下命令来检查计算机实际用于与之通信的地址:

ifconfig en0 | grep ether

ifconfig en0 | grep ether

mac os修改mac地址_如何在OS X上查找和更改您的MAC地址

This will output your MAC address for the hardware interface en0, which for most Macs is used for Wi-Fi. You can check which interface is used for wireless by holding down the Option key and clicking the Wi-Fi icon in the menu bar, which will quickly show you what device you are using to access the Internet:

这将为硬件接口en0输出您的MAC地址,对于大多数Mac,该接口用于Wi-Fi。 您可以通过按住Option键并单击菜单栏中的Wi-Fi图标来检查哪个接口用于无线网络,这将快速向您显示您要使用哪种设备访问Internet:

mac os修改mac地址_如何在OS X上查找和更改您的MAC地址
()

如何更改您的MAC地址 (How to Change Your MAC Address)

If you want to change your MAC address and have a specific one in mind, you can set it with:

如果要更改您的MAC地址并记住一个特定的MAC地址,可以使用以下方法进行设置:

sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff

sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff

This will set your MAC address for en0. If you have a Mac that also has an ethernet port, you may need to use en1.

这将为en0设置您的MAC地址。 如果您的Mac也具有以太网端口,则可能需要使用en1。

如何获得随机MAC地址 (How to Get a Random MAC Address)

If you’re going for privacy, randomizing your MAC address is probably the best option. This command will do it automatically:

如果您要追求隐私,那么随机选择MAC地址可能是最好的选择。 此命令将自动执行:

openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether

openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether

This will generate and set a new MAC address for en0 every time you run it. The changes made from both these commands will be reverted when you restart, so this is not permanent. If you want, you can make a script and set it to run on startup, giving you a new one for each session.

每次运行时,它将为en0生成并设置一个新的MAC地址。 重新启动时,这两个命令所做的更改将恢复,因此这不是永久的。 如果需要,可以制作一个脚本并将其设置为在启动时运行,从而为每个会话提供一个新脚本。

Keep in mind that after you edit your MAC address you may have network problems, so it is a good idea to restart your Wi-Fi after changing it.

请记住,在编辑MAC地址之后,您可能会遇到网络问题,因此,最好在更改Wi-Fi后重新启动它。

翻译自: https://www.howtogeek.com/220462/how-to-find-and-change-your-mac-address-on-os-x/

mac os修改mac地址