Skip to content

Instantly share code, notes, and snippets.

@jldupont
Created March 24, 2011 12:31
Show Gist options
  • Save jldupont/884972 to your computer and use it in GitHub Desktop.
Save jldupont/884972 to your computer and use it in GitHub Desktop.
Retrieve IP address associated with eth0 (bash)
ip address | grep eth0 | grep inet | awk -F" " '{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment