Network fixes

Find your IP address

Your local IP (on your home or office network) and your public IP (what websites see).

  1. Your local IP address
    Terminal
    ipconfig getifaddr en0

    en0 is Wi-Fi on most Macs. On a wired connection try en1.

  2. Your public IP address
    Terminal
    curl -4 -s https://ifconfig.me
  1. Your local IP address
    Terminal · Ubuntu / Debian
    hostname -I

    The first address is usually the one you want.

  2. Your public IP address
    Terminal · Ubuntu / Debian
    curl -4 -s https://ifconfig.me
  1. Your local IP address
    PowerShell
    Get-NetIPAddress -AddressFamily IPv4 | Where-Object InterfaceAlias -NotLike '*Loopback*' | Select-Object InterfaceAlias, IPAddress
  2. Your public IP address
    PowerShell
    curl.exe -4 -s https://ifconfig.me

New to IP addresses? I explain it in plain English on Layman Terms.