How to find the IP address of Windows, Linux, Mac and website?
An IP address (internal protocol) is a unique identifier that identifies a device on the Internet that is connected to and communicates with TCP/IP. One of the most common and popular examples of a network built on IP addresses is the World Wide Web and the Internet.
The address of each device on an IP subnet (sort of a subset of the full range of IP addresses) must always be unique. This means that no two devices on the same subnet can have the same IP address, otherwise it will result in an IP conflict.
For IPv4, its format can be 4 octets, such as xxxx, where each octet is 8 bits, or 0 to 255 in decimal. For example. 201.112.192.230. IPv6 addresses support a much larger range and are formatted as y:y:y:y:y:y:y:y, where each y is a segment that can range from 0 to FFFF in hexadecimal, such as 2001:0db8: 0001:0000:0000:0ab9:C0A8:0102.
The IP address helps locate the connected device and identify the network interface.
You also need to remember that each connected device can have two types of IP addresses:
- Private or internal IP address
- Public or external IP address
Internal IP addresses are for messaging and connecting on the internal network. Devices with these addresses are not globally available and are only available on the local network. Also, the same internal IP address can be used on two different subnets, so they are not necessarily unique identifiers.
Whereas, external IP addresses are globally available on the Internet. Because Internet addresses are unique, it also determines the location of the devices it connects from. Because IANA (Internet Assigned Number Authority) assigns a unique range of addresses in different countries.
Window
Using the command line
When you run the ipconfig command at the Windows command prompt, it will list all network adapters found on your Windows system. There may be multiple IP addresses in this list depending on your connection such as Ethernet, Wi-Fi, etc.
Here is an example:
Center for Communications and Data Transfer
Another way to find out the IP address of your system/network adapter is to open the Network and Sharing Center. To do this, open Control Panel and go to Network and Internet -> Network and Sharing Center -> Connections: / -> Details.
Here's what it looks like:
Settings app
Open the Settings app from the Start menu. Then go to Network and Internet -> Select the type of connection (here it is Wi-Fi) -> Hardware properties. Below is a screenshot showing network details from the Settings app:

Linux offers a number of options for checking your system's IP address. In addition to a GUI network manager based on a Linux distribution, there is a set of common CLI commands that are mostly supported in different distributions by default. So, we will consider such commands.
IP team
The ip command has many options. To list all network interfaces, use the ip a command or specify the network interface name as shown below.
$ ip addr show eth06: eth0: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:15:5d:8c:b4:c4 brd ff:ff:ff:ff:ff:ff inet 172.23.120.4/20 brd 172.23.127.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::215:5dff:fe8c:b4c4/64 scope link valid_lft forever preferred_lft forever $
hostname Command
The hostname command with the -I flag can list all IP addresses connected to your various network interfaces.
$ hostname -I172.23.120.4 10.42.0.0 10.42.0.1 $
command ifconfig
Like the ip command, ifconfig used to be the default command for viewing/changing network settings on a Linux system, although it is still supported by many distributions. You can use ifconfig -a to list all network adapters and their IP addresses, or specify a specific network interface with ifconfig:
$ ifconfig eth0eth0: flags=4163 mtu 1500 inet 172.23.120.4 netmask 255.255.240.0 broadcast 172.23.127.255 inet6 fe80::215:5dff:fe8c:b4c4 prefixlen 64 scopeid 0x20 ether 00:15:5d:8c:b4:c4 txqueuelen 1000 (Ethernet) RX packets 1339936 bytes 1152733066 (1.1 GB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 393472 bytes 333379281 (333.3 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 $
All of the above methods will show you the internal IP address of your network adapter. To view your external or public IP address from a Linux terminal, you can try any of the common tools below (note that all of these commands interact with an external service to get your public IP address):
$ curl ifconfig.me$ curl ident.me $ curl ipinfo.io/ip $ dig +short myip.opendns.com @resolver1.opendns.com $ host myip.opendns.com resolver1.opendns.com
Mak
On a Mac, you can use the GUI or the terminal method to get your IP address.
GUI method
- Open System Preferences from the Apple menu.
- Click "View" in the top menu and select "Network".
- Select the correct network connection from the menu on the left.
- On the right, you will be able to see your Mac's IP address.
command line method
- Open a terminal on your Mac.
- Now, to connect to the Ethernet network, you can use the ipconfig getifaddr en1 command to get the IP address.
Former:
[email protected] ~ % ipconfig getifaddr en1192.168.1.117 [email protected] ~ %
Website IP
In addition to your system's private and public IP addresses, there are the public IP addresses of websites on the Internet that you communicate with through web browsers or other applications. While you use DNS names to open or talk to a website, computers use IP addresses in the backend to make this communication work.
We can query the IP address of a website using some public utilities on any system such as ping, nslookup and dig. Although ping is not used solely to obtain an IP address, it retrieves an IP address in the process and can be viewed in the output. In addition, it is a common utility available for different OSes. Here are all these commands in action:
ping
$ ping -c4 wikipedia.comPING wikipedia.com (91.198.174.194) 56(84) bytes of data. 64 bytes from ncredir-lb.esams.wikimedia.org (91.198.174.194): icmp_seq=1 ttl=57 time=7.53 ms 64 bytes from ncredir-lb.esams.wikimedia.org (91.198.174.194): icmp_seq=2 ttl=57 time=7.58 ms 64 bytes from ncredir-lb.esams.wikimedia.org (91.198.174.194): icmp_seq=3 ttl=57 time=7.56 ms 64 bytes from ncredir-lb.esams.wikimedia.org (91.198.174.194): icmp_seq=4 ttl=57 time=7.59 ms --- wikipedia.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 7.532/7.564/7.591/0.022 ms $
You can explore other examples of ping commands.
nslukap
$ nslookup wikipedia.comServer: 127.0.0.53 Address: 127.0.0.53#53 Non-authoritative answer: Name: wikipedia.com Address: 91.198.174.194 Name: wikipedia.com Address: 2620:0:862:ed1a::3 $
dig the ground
$ dig +short wikipedia.com91.198.174.194 $
If you don't have a terminal handy or feel uncomfortable using one, don't be afraid. There are many whois tools available that can get information about a website's IP address right from the browser.
One of these wonderful whois utilities can be accessed from toadmin.ru Tools.

You can simply enter the domain name of the website you are looking for to find the IP address and click the "Find Host" button and the tool will show you the website's IP address as well as other interesting information such as location and details about hosting.

Output
An IP address is an essential part of how the Internet works today. In this article, we have looked at the difference between private and public IP address and how we can determine the IP address assigned to a network interface covering Windows, Linux and Mac systems.