how to find ip address on linux

How to Find IP Address on Linux – Know your Digital Address Easily

5 Mins Read

PUREVPNIP AddressHow to Find IP Address on Linux – Know your Digital Address Easily

Source

According to the latest statistics, there are around 32.8 million people who use Linux, which makes it the most reliable. Also, when it comes to the top web servers, around 96.3 use Linux. Wonder how you are unique on the internet? Your identity is your IP address.

In this blog, we will tell you how to find IP addresses on Linux. 

how to find ip address on linux

What is an IP address?

An IP address is short for Internet Protocol. It is a unique number or label assigned to your computer, smartphone, gaming console, or any other device connected to your network. 

IP address helps to identify and locate a device on the Internet uniquely. It also enables different devices to communicate. Linux uses two variations of IP addresses, and these are IPv4 and IPv6. 

Here is how an IP address helps you. 

  • IP address helps to diagnose and troubleshoot network connectivity issues.
  • You can set up remote access on your device if you know your device’s IP address
  • You can enable multiplayer functionality on your consoles
  • And you can even set up private gaming servers for uninterrupted sessions.

Why you need the IP address on your Linux

Before we tell you how you can find your IP address in Linux, let’s talk about why you need to find it and how it can help you in the long run.

Network configuration

Network configuration allows seamless communication within a local network to establish powerful internet connectivity. Because of the help of IP addresses, devices can exchange data efficiently by printing documents, sharing files, and streaming media.

When the Linux system connects to the internet, it obtains an IP address. This enables it to send and receive data across the global network. Data is accurately directed and enhances network communication if there is a correct network configuration. 

Port Forwarding 

If you’re hosting services like a web server on your Linux machine, you must configure port forwarding on your router. This process involves specifying the internal IP address of your Linux system. You need the IP to ensure the incoming traffic on specific ports is directed to the correct machine.

Security and Monitoring

Cyber attacks are on the rise, and it is important to keep your operating system in check with the help of security and monitoring tools. For monitoring and security tools, incoming and outgoing IP traffic is essential. 

Tools like firewalls and intrusion detection systems use IP addresses to filter and check internet traffic.

How to find your IP address in Linux? 

As you know, you need to find your IP address to carry out communication within your devices. Your IP address in Linux can easily be found with simple methods and commands. Let’s see what you need to do. 

Find your private IP address in Linux 

Your private IP address can be found by following the simple steps below.

  1. Begin by opening the terminal. 
  2. Enter the key combination [Ctrl] + [Alt] + [T]. 
  3. After entering the above key, you will see a command interface.
  4. Type the command “ifconfig”.
  5. You can use another “ip addr” command if the above doesn’t work.
  6. After typing the commands, press enter. 
  7. Now, all your network IP addresses will be visible to you. 
  8. To find the IP address of your device, look for the wlo1 section.
  9. Under the wlo1 section, ” inet ” is mentioned somewhere, followed by numbers. This will be your IPv4 address.
  10. If you want to find your IPv6, search for “inet6”. This will be your IPv6 address. 

Find your Public IP address in Linux

Public IP addresses help you in connecting with devices within your local network. However, it must be kept from a third party to protect your data. Linux enables you to fetch your public IP address in the following steps.

  1. Open the terminal on your computer directly.
  2. You can use or type the command [Ctrl] + [Alt] + [T] to open the terminal as well.
  3. You will get a command interface.
  4. Type the command “curl ifconfig.me”.
  5. Press enter.
  6. Under this command, your public address will be visible, containing four number blocks. 

Find your IP address in Linux with a GUI

Let’s say you use a point-and-click interface to run your Linux system. In this case, you can check your IP address by following these steps.

  • First, go to the Application menu and type Settings into the search bar.
  • Now click on the Settings icon that appears in the results.
  • The next step is finding the Network tab in the Settings Menu. Once you find it, click on the Advanced Wired Settings icon.
  • This will open a new pop-up window; here, you can see both your IPv4 address and your IPv6 address.

Finding your Linux IP writing a Bash Script

There is one other way through which you can find your IP address on Linux. For this step, you need to write a Bash Script, and that will find your address automatically. Here is how you can do it.

  • Open a new find_ip.sh file in your preferred text editor.
  • Now, you need to enter the code, which is find_ip.sh file.
  • Once you write it – save the file and close the editor.
  • After you close the editor, you will find private and public IP addresses on the lanIp and wanIp variables.

Finding the VPN IP address on Linux

It is obvious that being a gamer or a movie buff, you constantly need to use a VPN to access the games and movies that are not available in your country. 

If you ever wonder how you can find your VPN IP address on the Linux Operating system, then there is a way out for that as well. Let’s see how you can do it.

  • Click on this IP lookup tool.
  • Locate your Public IP address, ISP information, city and county.

Finding IP address on Ubuntu with two methods 

Ubuntu is an open-source and free-of-cost Linux distribution. It is frequently used as an operating system for cloud computing. It comes originally in three editions: Desktop, Server, and Core. 

Other versions are also available for Servers, IoT, and Cloud. Let’s see how you can find your IP address on Ubuntu. 

Find your IP address in Ubuntu.

Two different methods can be used to find your IP address in Ubuntu. 

Through Terminal:

  1. Open the terminal in your computer directly or type the command [Ctrl] + [Alt] + [T].
  2. Type the command “hostname-I.”
  3. Press enter. 
  4. An IP address containing numbers will be generated under this command for you. 

Through Settings:

Another method that you can use to find your Public IP address is through the settings. Follow the steps mentioned below.

  1. Click “Activities” and look for your menu bar’s “Settings” option. 
  2. In the settings, select your network or WiFi.
  3. Either beside or under your internet connection, there will be an arrow depending on your version.
  4. Click on this arrow, and a new window will open with a list of information.
  5. Look for your IP address and copy it to your clipboard. 

Bottom Line – Host servers, forward ports and expand your reach 

It’s obvious that your IP address is a critical component of internet communication. You can use your IP address for different online activities like hosting websites, running servers, or configuring network security measures. 

The time is now to expand your reach to a global audience. Find your IP address and port forward to the portal in a different virtual world. 

author

Marrium Akhtar

date

September 8, 2023

time

8 months ago

Marrium is a dedicated digital Marketer and an SEO enthusiast who is skilled in cracking SEO codes. Other than work, she loves to stream, eat, and repeat.

Have Your Say!!

Join 3 million+ users to embrace internet freedom

Signup for PureVPN to get complete online security and privacy with a hidden IP address and encrypted internet traffic.