Returns a character string comprising the local network IPv4 address, or vector if there are multiple addresses from multiple network adapters, or an empty character string if unavailable.

ip_addr()

Value

A named character string.

Details

The IP addresses will be named by interface (adapter friendly name on Windows) e.g. 'eth0' or 'en0'.

Examples

ip_addr()
#>         enp39s0      tailscale0         docker0 
#>   "10.2.72.104" "100.103.37.46"    "172.17.0.1"