Skip to content

Instantly share code, notes, and snippets.

@SunDi3yansyah
Created December 1, 2016 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SunDi3yansyah/bf9bd4fcd8698bda6781922b24318e30 to your computer and use it in GitHub Desktop.
Save SunDi3yansyah/bf9bd4fcd8698bda6781922b24318e30 to your computer and use it in GitHub Desktop.
IP address
#!/bin/bash
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment