This useful shell script will print information about your Ethernet or Wireless adapter. This is very useful for getting a lot of information at once.
#!/bin/sh DEV="eno16777736" echo "Showing information for the active network interface: $DEV." echo -e "-*- \e[1mGet timestamping information for your Ethernet device.\e[0m -*-" echo ethtool -T $DEV echo -e "-*- \e[1mPrinting main information about the Ethernet device.\e[0m -*-" echo ethtool $DEV echo -e "-*- \e[1mPrinting out the permanent hardware address.\e[0m -*-" ethtool -P $DEV echo echo echo -e "-*- \e[1mPrinting Ethernet adapter IP address.\e[0m -*-" # This tip from: http://unix.stackexchange.com/questions/103241/how-to-use-ifconfig-to-show-active-interface-only ifconfig | grep "inet " | grep -v 127.0.0.1 | sed -e 's/Bcast//' | cut -d: -f2
This script uses the ethtool command. This is very good for gaining IP address info as well as other useful information.