如何查看本機IP地址命令
要查看本機IP地址,您可以使用以下命令:
ipconfig
macos
ifconfig
ifconfig
詳細步驟
-
打開命令提示符
-
輸入命令
-
根據操作系統,輸入以下命令之一:
- Windows:ipconfig
- macOS 和 Linux:ifconfig
-
-
查看IP地址
- 命令執行后,您將看到一個包含網絡適配器列表的輸出。
- 您的本機IP地址通常標記為 “IPv4 地址” 或 “IP 地址” 字樣。
示例輸出
Windows
IPv4 地址. . . . . . . . . . . : 192.168.1.100
macOS
en0: ip address: 192.168.1.101
Linux
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0