Skip to content

Instantly share code, notes, and snippets.

@mosuka
Created February 26, 2016 07:57
Show Gist options
  • Save mosuka/3d886be1fa10bdae60fa to your computer and use it in GitHub Desktop.
Save mosuka/3d886be1fa10bdae60fa to your computer and use it in GitHub Desktop.
Command to check the IP address
if type ip > /dev/null 2>&1; then
IP_CMD="ip addr show"
else
IP_CMD="ifconfig -a"
fi
$IP_CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment