how to determine name/ip of primary network interface on centos x64 VPS

I am trying to install Virtualmin - GPL on a Centos x64 VPS.

After downloading the script install.sh, I tried running it... At one stage this is the message that i received--

eth0: error fetching interface information: Device not found
INFO - Unable to determine IP address of primary interface.
Please enter the name of your primary network interface:

How do I determine the IP address/name of the primary network interface? Do I have to ask my web host about this information?

Thanks, Arvind.

1 Answer

eth0 is the most common ethernet device name, but it is not the only one, other device names are possible. Do this:

route

On line which says default in the first column, the last column will be the device name you most probably need. Afterwards, run this:

ifconfig <devicename>

Look for the value after inet addr, usually on line 2 of output. This is the IP address you're looking for.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like