可以使用ifconfig命令查看当前的IP地址。

打开终端窗口,输入命令“ifconfig”,按下Enter键,就能查看到当前系统中网络接口(如eth0,wlan0)的IP地址和其他相关信息。
例如:
ifconfig
输出结果类似于:
eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::211:22ff:fe33:4455/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2887380 errors:0 dropped:0 overruns:0 frame:0
TX packets:190489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1077789580 (1.0 GB) TX bytes:17955571 (17.1 MB)
其中,inet addr:后面跟的就是该接口的IP地址。在上面的例子中,eth0接口的IP地址为192.168.0.101。

查看详情

查看详情