Networking script I am working on. This prints some information about your machine.

Posted: September 23, 2012. At: 10:52 PM. This was 5 years ago. Post ID: 4613

This perl script will print some information about your networking set-up on your Linux machine.


use warnings;

$iface = "eth0";

@data = `ifconfig`;

$net = $data[1];

$username = `logname`;
$kernel = `uname -r`;


printf("Hello %s \nThe IP of %s is:%s\n",$username, $iface, $net);

printf("The kernel version is: %s\n", $kernel);


No comments have been made. Use this form to start the conversation :)

Leave a Reply