• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Uncategorized / How To Find My Public IP Address In Ubuntu Command Line

How To Find My Public IP Address In Ubuntu Command Line

By Sourabh / February 15, 2024 Category: How To, Ubuntu, Uncategorized

This tutorial explains how to find my public ip address in Ubuntu Linux command line. If you want to check public ip in Ubuntu command line, here is the command to use.

What is Public IP Address

Your public IP address is the IP that is logged when you visit websites or use any other services on the Internet. It differs from your private IP address, which varies by individual device as each device is assigned a private IP address.

A public IP address is a unique address assigned to a device by an Internet Service Provider (ISP). It serves as an identifier for your device on the internet and allows other devices to connect and communicate with it.

Public IP addresses are required for devices that need to be directly accessible from the outside world, such as servers or devices hosting services like websites, mail servers, etc.

How To Check Ip Address In Ubuntu Terminal

To check the internal IP address on Ubuntu system run the following command:

$ ip a

To display the currently used DNS server IP address, run the following command:

$ systemd-resolve --status | grep Current

To display the default gateway IP address run the following command:

$ ip r

Find Public IP Address in Ubuntu

You can use wget command to find public ip address in Ubuntu. As we all know that the wget command is used to download files from the internet.When you execute wget command it will show your public IP. In the example shown below I have used amazonaws to download/retrieve file and thus show my public ip address:

wget -O - -q https://checkip.amazonaws.com

You can also use the dig command to display DNS information including the public IP address of your system via an external DNS server. You can use the following command to show public IP address of your system:

dig +short myip.opendns.com @resolver1.opendns.com

Find Local Ip Address

To display wireless network IP address:

  1. Open Settings and navigate to Wi-Fi in left pane.
  2. Click on the gear icon after the connected wifi network.
  3. In the pop-up it shows the detailed information including your IP address.

To display the wired network IP address:

  1. Open Settings and navigate to Network in left pane.
  2. Click on the gear icon under connected wired network.
  3. In the pop-up it shows the detailed information including your IP address.

Remember that your public IP address may change periodically or when you reconnect to the internet, especially if you have a dynamic IP assigned by your ISP. Therefore, it’s always advisable to confirm your IP address whenever needed.

Primary Sidebar

Latest Posts

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap