I already figured out that on Linux I can list network devices
(cd /proc/net/dev_snmp6/ && for device in *; do echo $device; done|sort)
but how can I get the ipv4 address of the device?
I do not have ifconfig/ip installed - and I'd like to keep it this way.
Here's a better one with answers in bash, python, and C: https://stackoverflow.com/q/5281341/141023
– cheshirekow Feb 11 '19 at 19:12hostname -I
does the work. – Rahmani Aug 19 '21 at 07:19