How to check ip address in linux

Just issue following command to check your ip address in linux


/sbin/ifconfig

ifconfig

ya, my ip address now is 10.0.0.6

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

Leave a Reply

avatar
newest oldest most voted
tanzila
Guest
tanzila

Ethernet IP address in linux OS, like centsOS, Kali linux and ubuntu can be configured.
https://www.youtube.com/watch?v=I1btwyqa1O0

Guest
Guest
Guest

For Ubuntu, and possibly other Linux/Unix versions:

% hostname -I (capital I as in Idaho)
192.168.1.20

If you have multiple interfaces active, you may get multiple ip addresses back.

yogeesh seralathan
Guest
yogeesh seralathan

Is it possible to get IP only ?
Because that would be very useful in automated scripts..

Arvind
Guest
Arvind

Nice Article

Keep writing

Thank you !!!

voyance
Guest
voyance

Greetings! Very useful advice in this particular
article! It is the little changes that will make the biggest changes.
Many thanks for sharing!

hftv699
Guest
hftv699

Nice

yui
Guest
yui

I used to check my network IP address using the site Ip-Details.com .

yui
Guest
yui

Nice

prakash
Guest
prakash

Thank you

David
Guest
David

There’s also a neat little utility that allows tracking the IP addresses of the machine it’s installed on. You can get the IP addresses via Email or have them written to a MySQL database. Here’s the link

Array St
Guest
Array St

Oke, thankss, this is enogh to help me..

Chris
Guest
Chris

Thanks you site is really helpful, I am just starting with linux and it gives simple answers to many of my questions

laura dogillo
Guest
laura dogillo

your website is very helpful for my study in Linux. Thank you very much.