Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aleron75
Created September 17, 2016 09:17
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 aleron75/f9e59194b471e73039ba286df6cb27c1 to your computer and use it in GitHub Desktop.
Save aleron75/f9e59194b471e73039ba286df6cb27c1 to your computer and use it in GitHub Desktop.
Get IP address on local network interface
#!/bin/bash
ip addr show eno1 | grep -oPi 'inet \K[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment