linux控制台查看ipv4地址,如何在Linux命令行上查看IP地址

您所在的位置:网站首页 debian查看mac地址 linux控制台查看ipv4地址,如何在Linux命令行上查看IP地址

linux控制台查看ipv4地址,如何在Linux命令行上查看IP地址

2023-07-27 22:05| 来源: 网络整理| 查看: 265

如何检查Linux命令行上的IP地址。 大多数Linux和Unix操作系统提供ifconfig和ip二进制文件。您可以简单地使用这些命令查找本地系统IP地址。

方法1#使用ifconfig命令

ifconfig命令一般在/sbin可用。因此,您将需要root或sudo访问权限,以便在许多操作系统上运行。

$ ifconfig

示例输出

eth0 Link encap:Ethernet HWaddr 00:0C:22:83:79:A3

inet addr:192.168.10.199 Bcast:192.168.1.255 Mask:255.255.255.0

inet6 addr: fe80::20c:29ff:fe89:79b3/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:3931508 errors:0 dropped:0 overruns:0 frame:0

TX packets:1333146 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:706273621 (673.5 MiB) TX bytes:857722605 (817.9 MiB)

Base address:0x2000 Memory:fd5c0000-fd5e0000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:65



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3