Skip to content

Instantly share code, notes, and snippets.

@66Ton99
Created September 18, 2011 19:02
Show Gist options
  • Save 66Ton99/1225409 to your computer and use it in GitHub Desktop.
Save 66Ton99/1225409 to your computer and use it in GitHub Desktop.
Ipconfig for Linux
#! /bin/bash
ifconfig
echo
echo Gateway" "Interface
route -n | awk '/UG/ {printf "%-21s %s\n",$2,$8}'
echo
echo DNS Servers
awk '/nameserver/ {print $2}' /etc/resolv.conf
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment