How to find your IP Address (IPv4 and IPv6) on Rocky Linux

Every computer, whether server or client, connected to the Internet has an assigned IP address and communicates with other services using the TCP/IP protocol. In this tutorial, we will learn how to find out public and private IP addresses on Rocky Linux. You can find out your IP address either through the terminal or through a GUI option. So let’s get started. The same commands work on other RHEL-based Linux distributions like AlmaLinux and CentOS too.

Find the Public IP address on Rocky Linux

Here is a list of commands and services that can be used to get your external IP address. Just paste one of the on the command line to get the IP.

  • curl
  • curl
  • curl
  • curl
  • curl
  • dig +short
  • host
  • curl
  • curl
  • curl

Check Private IP Address via Terminal

To find out your system IP address through the terminal, open up the terminal and type the following command:

# ifconfig
# ip addr show
# ip a

You can use any one of the following commands to view your system IP address.

Get Internal IP address

As you can see network adapter ens33 with IP address is assigned to my system.

Check Private IP Address via GUI

For this option, you must have GUI installed on your System. Now login to your system and type Settings in the search bar and click:

Open settings

The sidebar appears on your left side, navigate to the Network tab. After that click on the icon which was highlighted, to view system IP address as shown in the figure:

Network settings

Now you can see your system IP address which is

IP address


In this tutorial, we learned how to find out your Public IP address using curl, host, and dig. We also saw how to find a system’s internal Private IP address using CLI and GUI in Rocky Linux 8. If you are using Debian Linux, take a look here.