输入ifconfig或ip addr查看ip时,发布出来的网络名太多,翻了好几屏,想看的网卡信息被挡住了,并且是自动获取IP的,现在不知道IP,远程ssh工具也没法连,用如下方法可以查看:
[root@localhost ~]# cd /etc/sysconfig/network-scripts
[root@localhost network-scripts]# ls
ifcfg-ens33
[root@localhost network-scripts]# ifconfig ens33
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.170 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::18f1:54b1:cedc:fbf9 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:de:ae:49 txqueuelen 1000 (Ethernet)
RX packets 2435 bytes 2734266 (2.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2414 bytes 523414 (511.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost network-scripts]#
本文介绍了一种在Linux系统中快速定位特定网卡及其IP地址的方法,通过进入网络配置脚本目录并使用ifconfig命令,即使在大量网络设备中也能轻松找到所需信息。
286

被折叠的 条评论
为什么被折叠?



