How to Check IP on Linux

How to Check IP on Linux

How to Check IP on Linux

(How to Check IP on Linux) The task of examining your IP address serves a basic role in Linux system operation for network issue debugging and server setup as well as remote access configuration. Linux supplies multiple tools together with commands that enable users to obtain both their internal private IP addresses as well as their external public IP addresses. This complete guide explains how to check IP addresses on Linux through three available methods: command-line tools and graphical user interfaces as well as online options.

Understanding IP Addresses in Linux

Before diving into the commands, it is essential to understand the types of IP addresses:

Private (Local) IP Address

  • Assigned by your router or local network.
  • Used for communication within a network.
  • Example: 192.168.1.10, 10.0.0.15.

Public (External) IP Address

  • Assigned by your Internet Service Provider (ISP).
  • Used to communicate over the internet.
  • Example: 203.0.113.25, 45.76.180.20.

Checking Private IP Address on Linux

There are multiple commands to find your private (local) IP address in Linux.

Method 1: Using ip Command (Recommended)

The ip command is a modern replacement for ifconfig. To check your IP address, run:

How to Check IP on Linux

or

How to Check IP on Linux
Example Output:
How to Check IP on Linux

👉 Your private IP address is 192.168.1.100 in this example.

Method 2: Using hostname -I Command

This command provides only the IP address without additional details.

How to Check IP on Linux
Example Output:
How to Check IP on Linux

💡 Use this when you need just the IP without extra network details.

Method 3: Using ifconfig Command (Older Method)

The ifconfig command was used in older Linux systems but is now deprecated. If it’s not installed, you can add it via:

How to Check IP on Linux

Then run:

How to Check IP on Linux
Example Output:
How to Check IP on Linux

👉 Your private IP is 192.168.1.100.

Method 4: Using nmcli (For NetworkManager Users)

If your system uses NetworkManager, you can check the IP address using:

How to Check IP on Linux
Example Output:
How to Check IP on Linux

Checking Public (External) IP Address

Method 1: Using curl Command

To find your public IP address, use the following command:

How to Check IP on Linux

or

How to Check IP on Linux
Example Output:
How to Check IP on Linux

💡 This is your external (public) IP address assigned by your ISP.

Method 2: Using wget Command

If curl is not installed, you can use wget:

How to Check IP on Linux

Method 3: Using dig Command (From DNS)

How to Check IP on Linux

👉 Example Output: 203.0.113.25

If dig is not installed, install it via:

How to Check IP on Linux

Method 4: Using External Web Services

You can check your IP online by visiting:

🔗 https://whatismyipaddress.com/
🔗 https://ipinfo.io/

Checking IP in GUI (Graphical Interface)

If you’re using a desktop environment, follow these steps:

For Ubuntu (GNOME/KDE)

  • Click on Settings → Network.
  • Select your active network (Wi-Fi or Ethernet).
  • Your IP address will be listed under IPv4 Address.

For Linux Mint/CentOS

  • Go to System Settings → Network Connections.
  • Select your network connection and click Details.
  • You will see your IP address there.

Finding IP Address of Another Device on Network

Check IP of Connected Devices

To list all devices connected to your network, run:

How to Check IP on Linux

Ping a Device to Get Its IP

If you know the hostname, find the IP by running:

How to Check IP on Linux

Checking IP Address in a Server Environment

If you’re working on a remote Linux server (VPS or Cloud Instance), you can use:

How to Check IP on Linux

For cloud services:

How to Check IP on Linux

Troubleshooting IP Issues in Linux

Issue: IP Address Not Displayed

Solution: Restart your network service:

How to Check IP on Linux

Issue: Can’t Find Public IP

Solution: Check if curl or wget is installed:

How to Check IP on Linux

Issue: Can’t Connect to Network

Solution: Reset your network interface:

How to Check IP on Linux

Conclusion

Knowing your IP address in the Linux environment stands as an essential ability needed when performing network configuration and troubleshooting of connectivity problems and system security tasks. This guide contains multiple procedures to find your network-local IP addresses as well as the external IP address which your Internet Service Provider assigns for internet access.

Among the tools for fast IP checks hostname -I and curl ifconfig.me encode very useful information. Network details are most easily obtained through the use of ip a and nmcli commands which show interface operational data and subnet configuration information. Users who use desktop GUIs can locate their IP address through the Network Settings of their operating system.

To protect your system effectively you must grasp your IP address because it is vital for server administration and VPN deployment along with firewall configuration and security surveillance responsibilities. The setup of remote SSH access together with web hosting configuration requires full knowledge of your public IP address.

These methods will enable you to successfully conduct networking tasks across all Linux systems no matter your skill level or system administrator status. After mastering the steps for checking your IP address on Linux it is time to delve into more networking utilities such as netstat and traceroute and ping to advance your troubleshooting procedures.

Leave a Reply

Your email address will not be published. Required fields are marked *