How to find out the IP address of a system?

Posted on 2006-11-17
Last Modified: 2013-12-16

I'd like to find out the IP address of our Linux system. On Windows, we've the command "ipconfig /all" and it list all the info about the IP addresses that are assigned to a system. Which command should we use to get the same info on a Linux terminal?

Thanks a lot,

Question by:somits
  • 3
  • 2
LVL 11

Assisted Solution

elbereth21 earned 150 total points
ID: 17965856
Hi somits,
the command is similar: ifconfig


Author Comment

ID: 17965876

Thanks a lot for the info. And how about the MAC address?  Which command to get the MAC address of the NIC card eth0.


LVL 11

Expert Comment

ID: 17965897
Ifconfig also shows your MAC (HWAddress)
Other useful command are ifup or ifdown to, respectively start and stop an interface.
Your current configuration is saved in a file which in RedHat based distributions is under /etc/sysconfig/network-scripts/ifcfg-eth0.
It also contains your MAC and default gateway.
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

LVL 11

Expert Comment

ID: 17965905
What linux distro are you currently using?
LVL 43

Accepted Solution

ravenpl earned 350 total points
ID: 17965966
/sbin/ip addr
/sbin/ip link
LVL 43

Expert Comment

ID: 17965973
The latter shows You HW info (like MAC) even the link is down/unused.

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
change time in cron 4 67
Setting up Two Three NICs with One on a Different Subnet 22 63
Backup & Restore 3 47
How to install Ubuntu 16 in DELL venue 8 pro 20 58
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now