HowTo: Determine an IP Address My Linux Server

Posted on in Categories , , , last updated January 17, 2014

I am a new Linux system user. How do I find out the IP address of Linux server? How do I determine the IP address of Linux server using command line options?

You can use any one of the following command to find the IP address on Linux operating systems using command line based options:

a) ip command – show / manipulate routing, devices, policy routing and tunnels.

b) ifconfig command – configure a network interface.

Determine ip address using ifconfig command

In this example, find the ip address of the server using the following ifconfig command:
$ ifconfig
$ ifconfig eth0

Sample outputs:

Fig.01: ifconfig in action
Fig.01: ifconfig in action

Determine ip address using ip command

In this example, find the ip address of the server using the following ifconfig command:
$ ip a list
$ ip a list eth0

Sample outputs:

Fig.02 ip command in action
Fig.02 ip command in action

Leave a Comment