putty如何看本服务器ip

在 Putty 中连接到 Linux 服务器后,您可以通过以下命令查看服务器的 IP 地址:

  1. 使用 ifconfig 命令(在一些较新的系统中可能是 ip addr 命令):
    • 输入 ifconfig 命令后,会显示网络接口的信息,包括 IP 地址。通常您关注类似于 eth0 或 ens33 这样的网络接口的 inet 字段后面的地址,那就是服务器的 IP 地址。
    • 如果系统使用的是 ip addr 命令,执行后会显示更详细的网络接口和地址信息,您可以查找类似于 inet <IP 地址> 这样的行来获取 IP 地址。

例如,如果输出类似于:

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::20c:29ff:fe70:6c8b  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:70:6c:8b  txqueuelen 1000  (Ethernet)
        RX packets 1234  bytes 123456 (123.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 123  bytes 12345 (12.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

那么 192.168.1.100 就是该服务器在 eth0 接口上的 IP 地址。复制重新生成

putty 中显示服务器 IP 地址的常用命令有哪些?

除了 putty,还有哪些工具可以查看服务器的 IP 地址?

如何在 Windows 系统中查看服务器的 IP 地址?

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注