Skip to content

Instantly share code, notes, and snippets.

@linki
Last active August 29, 2015 14:07
Show Gist options
  • Save linki/6e60f390d12e87a995fe to your computer and use it in GitHub Desktop.
Save linki/6e60f390d12e87a995fe to your computer and use it in GitHub Desktop.
get the ip address of eth0
root@ocean:~# ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1;}'
=> 80.240.142.239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment