Score:1

Where is the Internal IP address stored in Ubuntu?

us flag

Is there some file in the Linux-Ubuntu filesystem that contains the internal IP of the machine running it? Ideally, is the output provided by the following command

hostname -I

saved somewhere in the filesystem?

(thanks to How do I find my internal ip address?)

Score:5
om flag

You can find a tree in /proc/net/fib_trie

Otherwise you can look it up with a tool such as ip addr

AndrewSpan avatar
us flag
Thanks for the answer! Is there another file that contains the public IP?
vidarlo avatar
om flag
@AndrewSpan no. There's simply no way a host can know this. In complex configurations the answer may be multiple. At work internet egress depends on country, target and protocol for instance.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.