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

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

by Vitux Staff

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 ifconfig.me
  • curl icanhazip.com
  • curl ipinfo.io/ip
  • curl api.ipify.org
  • curl checkip.dyndns.org
  • dig +short myip.opendns.com @resolver1.opendns.com
  • host myip.opendns.com resolver1.opendns.com
  • curl ident.me
  • curl bot.whatismyipaddress.com
  • curl ipecho.net/plain

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.

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

As you can see network adapter ens33 with IP address 192.168.40.130/24 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:

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

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:

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

Now you can see your system IP address which is 192.168.40.130.

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

Conclusion

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.

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

FAQs

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

You can determine the IP address or addresses of your Linux system by using the hostname , ifconfig , or ip commands. To display the IP addresses using the hostname command, use the -I option.

How do I find IPv4 and IPv6 in Linux? ›

Using ifconfig Command

The system displays all network connections, including connected, disconnected, and virtual. Look for the one labeled UP, BROADCAST, RUNNING, MULTICAST to find your IP address. This lists both IPv4 and IPv6 addresses.

How do I find my IPv4 and IPv6? ›

Open the Start menu and select Settings. Choose Network & internet from the menu on the left, then click Properties along the top. You'll find your IPv4 and IPv6 address listed here.

How do I find my ip4 address in Linux? ›

The following commands will get you the private IP address of your interfaces:
  1. ifconfig -a.
  2. ip addr (ip a)
  3. hostname -I | awk '{print $1}'
  4. ip route get 1.2.3.4 | awk '{print $7}'
  5. (Fedora) Wifi-Settings→ click the setting icon next to the Wifi name that you are connected to → Ipv4 and Ipv6 both can be seen.

How to check IPv6 on Linux? ›

To check whether a CS Linux server is running IPv4 or IPv6, use the command ifconfig -a and look at the IP address or addresses in the output. These will be IPv4 dotted-decimal addresses, IPv6 hexadecimal addresses, or both.

What is IPv4 and IPv6 in Linux? ›

IPv4 is composed of 32-bit address length and is the fourth version of the Internet Protocol (IP). IPv6 is composed of 128-bit address length and is the latest updated version of the Internet Protocol (IP).

How to get IPv4 address from command line? ›

First, click on your Start Menu and type cmd in the search box and press enter. A black and white window will open where you will type ipconfig /all and press enter. There is a space between the command ipconfig and the switch of /all. Your IP address will be the IPv4 address.

How do I find my IPv4 address? ›

On the taskbar, select Wi-Fi network > the Wi-Fi network you're connected to > Properties. Under Properties, look for your IP address listed next to IPv4 address.

How do I know if IPv4 is enabled Linux? ›

To check whether a CS Linux server is running IPv4 or IPv6, use the command ifconfig -a and look at the IP address or addresses in the output. These will be IPv4 dotted-decimal addresses, IPv6 hexadecimal addresses, or both.

How do I find my IP address in terminal? ›

In the Terminal window, type "ifconfig" and press Enter. Locate the section that corresponds to your active network connection (usually labeled "en0" or "en1"). Look for the "inet" line; the number next to it is your computer's IP address.

How do I find all IP addresses on a network Linux? ›

On Linux, type the command “ifconfig” and press Return. On Windows, type the command “ipconfig” and press Return. Get more information by typing the command “arp -a.” You should now see a basic list of the IP addresses for devices connected to your network.

What is the IP command in Linux? ›

The ip command is a Linux networking tool for system and network administrators. IP stands for Internet Protocol and as the name suggests, the tool is used for configuring network interfaces. Older Linux distributions used the ifconfig command, which operates similarly.

How do I find my IP address on a local network Linux? ›

You'll find all information on all devices in your network by using the 'ifconfig' command in Linux. To find your own computer's IP address, search for the `inet´ tag. You'll find this under `wlo1´.

How do I know if my IP is IPv6? ›

One of the differences between IPv4 and IPv6 is the appearance of the IP addresses. IPv4 uses four 1 byte decimal numbers, separated by a dot (i.e. 192.168. 1.1), while IPv6 uses hexadecimal numbers that are separated by colons (i.e. fe80::d4a8:6435:d2d8:d9f3b11).

How do I get my IPv6 address? ›

Find Your Private (local) IPv4 and IPv6 Address in Settings: Open Settings (Win+I). Click/tap on Network & internet on the left side, and click/tap on Properties for the connected network you want. You will now see the private (local) IPv4 address and IPv6 address for this network.

How to see IPv6 in ipconfig? ›

To display IPv6 information:
  1. Open an elevated/administrator command prompt.
  2. Use ipconfig to display IP address information. ...
  3. Type netsh interface ipv6 show interfaces and press Enter. ...
  4. Type netsh interface ipv6 show addresses and press Enter. ...
  5. Type netsh interface ipv6 show destinationcache and press Enter.
Jan 5, 2016

Which Linux command displays IPv4 and ipv6 assigned addresses on a Linux host? ›

You can also use the ifconfig command to display only IPv4 or IPv6 address assignments. To additionally display the MAC addresses of the interfaces, you must first log in as superuser or assume the appropriate role.

How do I see all IP addresses on a network in Linux? ›

How to Find All IP Addresses on a Network
  1. Open the command prompt.
  2. Enter the command “ipconfig” for Mac or “ifconfig” on Linux. ...
  3. Next, input the command “arp -a”. ...
  4. Optional: Input the command “ping -t”.
Jan 4, 2023

How to change ipv6 to IPv4 in Linux? ›

Red Hat-based distributions
  1. Open the terminal window.
  2. Change to the root user.
  3. Type these commands: sysctl -w net.ipv6.conf.all.disable_ipv6=1. sysctl -w net.ipv6.conf.default.disable_ipv6=1. ...
  4. To re-enable IPv6, type these commands: sysctl -w net.ipv6.conf.all.disable_ipv6=0. sysctl -w net.ipv6.conf.default.disable_ipv6=0.

Top Articles
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 6096

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.