1、ifconfig  可查看ip和Mac

可以查看所有激活的网卡信息,其中包括Mac和IP地址

[root@loaclhost /]# ifconfig

2、ifconfig -a|grep 10  可查看ip和Mac(比较直观)

当Linux上没有连接鼠标时,无法通过鼠标查看Mac和IP,所以用该命令可以简要显示网卡的前十个重要简短信息,这样就看的比较直观。

[root@loaclhost /]# ifconfig -a|grep 10

3、ip addr 、ip addr show、 ip address show 可查看ip和Mac

三条命令输出的内容相同。查看网卡的ip和Mac、掩码等相关信息。 

[root@loaclhost /]# ip addr

[root@loaclhost /]# ip addr show

[root@loaclhost /]# ip address show

4、ifconfig|grep ether    只查看网卡的所有Mac地址。

[root@loaclhost /]# ifconfig |grep ether

5、ip link 只查看网卡的所有Mac地址。

[root@loaclhost /]# ip link

-----------------------------------------以下无正文------------------------------

GitHub 加速计划 / li / linux-dash
10
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:9 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐