Created
January 19, 2020 07:24
-
-
Save p3x-robot/b5d9d71c5252fd4e62d848371ac992b0 to your computer and use it in GitHub Desktop.
Linux IPv6 addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ip addr show dev enp1s0f2 | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
linux-get-ipv4-address.sh:
ip addr show | sed -e's/^.*inet \([^ ]*\)\/.*$/\1/;t;d'