How to get the IP address on Linux systems?


You can get the IP address of a Linux server by the following commands;

linuxserver:~ # ip addr show
1: lo: <LOOPBACK,UP> —–
link/loopback—-brd —-
inet —–scope host lo
inet6—- scope host
valid_lft forever preferred_lft forever
2: eth5: <BROADCAST,MULTICAST,UP>—–
link/ether ——- brd ff:ff:ff:ff:ff:ff
inet 192.168.3.100/24 brd ——–-> IP address is here
inet6 — scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> ——
link/sit ——

Second solutions is;

linuxserver:~ # clear
linuxserver:~ # ifconfig

eth5      Link encap:Ethernet  HWaddr ———
    inet addr:192.168.3.100  Bcast:—  Mask:—–
inet6 addr:—– Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:—  Metric:—-
RX packets:— errors:0 dropped:0 overruns:0 frame:0
TX packets:— errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:—-
RX bytes— TX bytes:—–
Interrupt:— Base address:—-

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::— Scope:Host
UP LOOPBACK RUNNING  MTU:— Metric:1
RX packets:— errors:0 dropped:0 overruns:0 frame:0
TX packets:—-errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:— TX bytes:—-

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s