find this machine's ip address

This machine's address on the local network, and the one the internet sees.

  • network

Steps

  1. ip -br addr

    every interface and its addresses (Linux)

  2. hostname -I

    the addresses only (Linux)

  3. ip route get 1.1.1.1

    the address used to go out: after src

  4. curl -s https://ifconfig.me

    the public address the internet sees

  5. ipconfig getifaddr en0

    macOS, Wi-Fi or the first network port

Commands used

  • ip
  • hostname
  • curl

Each has a page in lore: lore ip opens it.