Skip to content

Instantly share code, notes, and snippets.

@lifeofcoding
Forked from SunDi3yansyah/ip.sh
Created April 23, 2020 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifeofcoding/2b25096ff1949a25b8971d06cc4a8b0c to your computer and use it in GitHub Desktop.
Save lifeofcoding/2b25096ff1949a25b8971d06cc4a8b0c 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