Welcome! 登入 註冊
美寶首頁 美寶百科 美寶論壇 美寶落格 美寶地圖

Advanced

[HOW TO] Find the IP Address of Your Linux Server: ifconfig

Posted by HP 
[HOW TO] Find the IP Address of Your Linux Server: ifconfig

分類標籤: Linux系統管理
Basically it's very easy to lookup the IP address of your Linux server even if you are not very familiar with the black-and-white command line. Simply type ifconfig in the command line prompt:

Shell> ifconfig

and you will see (e.g. in our current settings in www.mepopedia.com):

dsl0      Link encap: Point-to-Point Protocol  
          [size=large]inet addr:114.32.138.191[/size]  P-t-P:114.44.96.254  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:138722 errors:0 dropped:0 overruns:0 frame:0
          TX packets:172306 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:14210409 (13.5 Mb)  TX bytes:172568336 (164.5 Mb)

eth0      Link encap:Ethernet  HWaddr 00:50:BF:21:5A:7B  
          inet6 addr: fe80::250:bfff:fe21:5a7b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:140766 errors:1 dropped:8192 overruns:1 frame:0
          TX packets:187004 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17385017 (16.5 Mb)  TX bytes:181005262 (172.6 Mb)
          Interrupt:16 Base address:0x8c00 

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:2269354 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2269354 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:861014845 (821.1 Mb)  TX bytes:861014845 (821.1 Mb)

The IP address is in the part of inet addr.

Another interesting way to "check" IP is to simply go to http://www.ipmango.com/, and you will see what and "where" your IP is.

Cheers!


Reference to ifconfig: http://linux.die.net/man/8/ifconfig (wiki)
Chinese reference of ifconfig: http://linux.vbird.org/linux_server/0140networkcommand.php#ifconfig



Edited 2 time(s). Last edit at 10/31/2009 04:02PM by HP.
(編輯記錄)