ifconfig查看ip地址
时间: 2023-08-20 19:07:53 浏览: 53
您可以使用 `ifconfig` 命令来查看您的 IP 地址。请注意,`ifconfig` 命令在不同的操作系统上可能会有所不同。以下是在 Linux 系统上使用 `ifconfig` 命令查看 IP 地址的示例:
打开终端,并输入以下命令:
```
ifconfig
```
然后您会看到类似以下的输出:
```
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe8a:5d4d prefixlen 64 scopeid 0x20<link>
ether 08:00:27:8a:5d:4d txqueuelen 1000 (Ethernet)
RX packets 144471 bytes 171778392 (171.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3572 bytes 335972 (335.9 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
在上述输出中,inet 后面的地址就是您的 IP 地址。在这个例子中,IP 地址是 `192.168.1.100`。请注意,您的实际 IP 地址可能会有所不同。