查看linux的IP地址

查看linux的IP地址
[root @localhost ~]# cd /sbin/      ----进入sbin目录
[root @localhost sbin]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:21:2E:BE
          inet addr:192.168.2.45 Bcast:192.168.2.255 Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe21:2ebe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:1068 errors:0 dropped:0 overruns:0 frame:0
          TX packets:193 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:76705 (74.9 KiB) TX bytes:24700 (24.1 KiB)
          Interrupt:67 Base address:0x2024
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:1880 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1880 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4160092 (3.9 MiB) TX bytes:4160092 (3.9 MiB)

你可能感兴趣的:(查看linux的IP地址)