Skip to content

Instantly share code, notes, and snippets.

@p3x-robot
Created January 19, 2020 07:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p3x-robot/b5d9d71c5252fd4e62d848371ac992b0 to your computer and use it in GitHub Desktop.
Save p3x-robot/b5d9d71c5252fd4e62d848371ac992b0 to your computer and use it in GitHub Desktop.
Linux IPv6 addresses
sudo ip addr show dev enp1s0f2 | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d'
@BoQsc
Copy link

BoQsc commented Mar 31, 2020

linux-get-ipv4-address.sh: ip addr show | sed -e's/^.*inet \([^ ]*\)\/.*$/\1/;t;d'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment