Get your private and public IP from the Linux terminal | Linux Today

Get your private and public IP from the Linux terminal

Written By
Web Webster
Web Webster
Jan 27, 2013

Both for a real server, VPS or just your desktop is useful to know which IP address your Linux system is using , this can be easily seen with some command if you are directly connected to Internet via a modem or a public IP of your company, but sometimes you are behind a router, a device that forwards data packets between computer networks, creating an overlay internetwork. A router is connected to two or more data lines from different networks, and at home it’s used to ???share??? your ADSL that usually has 1 public IP among all your devices, that will get each a private IP. For example at my home I’ve an ADSL Wi-Fi router that I use to get Wi-Fi connection to my 3 PC, 1 smartphone and 1 tablet (android), a printer and my kindle, every device has a private IP , it’s called private because it’s not visible on the public network that can only ???see??? the IP of my Wi-Fi router, but now let’s see how to check your IP on your Linux computers.

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.