Skip to main content
Knowing your IP address is useful for networking, troubleshooting, and server configuration.
1

Open terminal

Press Ctrl+Alt+T to open the terminal.
2

Show all IP addresses

Display detailed network interface information:
ip addr show
This shows all network interfaces with their IP addresses, MAC addresses, and status.
3

Show only IPv4 address

Get just your IPv4 address in a simple format:
hostname -I
This command shows all IPv4 addresses assigned to your system.
4

Verify network connectivity

Test your internet connection:
ping google.com -c 4
The -c 4 flag sends exactly 4 ping packets and then stops.

Additional IP address commands

Show only specific interface

ip addr show eth0

Get public IP address

curl ifconfig.me

Show routing table

ip route show

Check DNS resolution

nslookup google.com

Show network statistics

ss -tuln

GUI alternatives

Network Settings

  • Open Settings
  • Go to Network
  • Click on your connection
  • View IP address information

System Monitor

  • Open System Monitor
  • Go to Resources tab
  • View network information

Troubleshooting network issues

Check if interface is up

ip link show

Restart network service

sudo systemctl restart NetworkManager

Check DNS configuration

cat /etc/resolv.conf

Test localhost

ping 127.0.0.1

Network configuration files

View network interfaces

cat /etc/network/interfaces

Check NetworkManager configuration

ls /etc/NetworkManager/system-connections/

Next Steps

Understanding your IP address helps you:
  • Configure network services
  • Troubleshoot connectivity issues
  • Set up port forwarding
  • Configure firewall rules

Build docs developers (and LLMs) love