linux服务器如何查看mac地址,linux如何查看mac地址_查看mac地址 linux_linux查看mac地址...

b13fd48065380cd747aaf9daa644ad3459828116.jpg

本文主要介绍下设置MAC地址的方式。

#1,查看当前MAC地址,并且备份

查看当前MAC地址:

ifconfig | grep HWaddr

output:

eth0 Link encap:Ethernet HWaddr 00:19:48:2E:D1:2

74625919124fd0c1ce093a09cc96cb5e.png

00:19:48:2E:D1:2即是你的MAC地址linux如何查看mac地址,将其复制到一个文件中保存。

#2,以root权限修改MAC地址:

禁用eth0

ifdown eth0

修改MAC地址为00:E0:81:5C:B4:0F

ifconfig eth0 hw ether 00:E0:81:5C:B4:0F

生效修改:

ifconfig eth0 | grep HWaddr

提示linux如何查看mac地址,上述设置MAC地址只是暂时的。一旦重启,系统会修复原物理MAC地址。

How to change MAC address in Fedora

1. First step is to find the current MAC address and take a backup copy in a safe place.

To know your current MAC type:

$ ifconfig | grep HWaddr

eth0 Link encap:Ethernet HWaddr 00:19:48:2E:D1:27

The above hexadecimal numbers 00:19:48:2E:D1:27 is your MAC address for device eth0.

Simply copy and paste it in a file.

2. Now, time to change the MAC address this requires you to work as root user.

Take the network interface down

# ifdown eth0

Now, lets change the current MAC address to 00:E0:81:5C:B4:0F

# ifconfig eth0 hw ether 00:E0:81:5C:B4:0F

Take the network interface up again

# ifconfig eth0 up

Check if your MAC address is changed:

# ifconfig eth0 | grep HWaddr

Note:

Changing MAC address is only temporary. Once you reboot your machine, the operating system will reflect the physical MAC address burnt in your network card and not the MAC address you set.

本文来自电脑杂谈,转载请注明本文网址:

http://www.pc-fly.com/a/ruanjian/article-129116-1.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值