This program will return the IP address of a specified network interface. Use the –ip parameter to get the IP. For example, this will show the IP address of an ethernet interface: ./a.out –ip eth0. #include <stdio.h> #include <string.h> /* for strncpy */ #include <unistd.h> // for close #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include …

Showing the routing table in Linux is very useful when you are required to get information about a network. This is the output when retrieving the routing table in Windows 7. C:\Users\jason>route PRINT =========================================================================== Interface List 16…00 ff f0 18 9a f5 ……TAP-Windows Adapter V9 13…00 13 46 3a 02 83 ……Realtek RTL8139/810x Family Fast …

I wanted to update my Ubuntu 14.04 server and I saw this output. I needed to remove these unwanted packages on my system. [email protected]:~$ sudo apt-get upgrade Reading package lists… Done Building dependency tree Reading state information… Done Calculating upgrade… Done The following packages were automatically installed and are no longer required: libdigest-hmac-perl libdrm-intel1 libdrm-nouveau2 …

How to get the geographical location of an IP address. This simple command will get this for you. [[email protected]:~] curl ipinfo.io/203.113.124.148 ; echo "" { "ip": "203.113.124.148", "hostname": "No Hostname", "city": "", "region": "", "country": "TH", "loc": "13.7500,100.4667", "org": "AS9737 TOT Public Company Limited" }[[email protected]:~] curl ipinfo.io/203.113.124.148 ; echo "" { "ip": "203.113.124.148", "hostname": "No …