find this machine's ip address
This machine's address on the local network, and the one the internet sees.
Steps
-
ip -br addrevery interface and its addresses (Linux)
-
hostname -Ithe addresses only (Linux)
-
ip route get 1.1.1.1the address used to go out: after src
-
curl -s https://ifconfig.methe public address the internet sees
-
ipconfig getifaddr en0macOS, Wi-Fi or the first network port
Commands used
iphostnamecurl
Each has a page in lore: lore ip opens it.
Related recipes
- check a certificateSee a site's TLS certificate, when it expires and who issued it, or the same for a .pem file.
- copy files to and from a serverCopy a file or a whole folder between this machine and another one over ssh.
- download a whole folder from a websiteFetch every file under a web folder, without climbing to the folders above it.
- make web requests with curlSend GET and POST requests, JSON and files, see headers and status codes, go through a proxy.