missing ifconfig on VMWare 3.5

Posted on 2009-05-27
Medium Priority
Last Modified: 2013-12-16
I'd like to use ifconfig to discover/set the IP addresses of the physical NICs in my VMware host server from the console.  But when I try to locate the ifconfig utility, it doesn't seem to be installed.  Neither 'find' nor 'slocate' can locate the utility.  It doesn't seem to be in /sbin or any other place.

I'm open to alternatives.  All I need to do is set the IPs for the physical NICs on the host server.  These NICs are connecting my VMs to our production LAN via a vSwitch.
Much thanks!
Question by:DetersLaw

Expert Comment

ID: 24483975
ifconfig is situated in /sbin on an ESX 3.5 Vmware server
you must be root to use this command

Expert Comment

ID: 24483992
If you do not have the ifconfig in sbin I can only assume you have ESXi

If your using ESXi I would recommend downloading the RCLI (Remote Command Line Interface) which is a Virtual Appliance to help with the command line of ESXi.

Or you can look at

esxcfg-vmknic <options> [[<portgroup>]]
-a|--add                   Add a VMkernel NIC to the system,
                           requires IP parameters and portgroup name.
-d|--del                   Delete VMkernel NIC on given portgroup.
-e|--enable                Enable the given NIC if disabled.
-D|--disable               Disable the given NIC if enabled.
-l|--list                  List VMkernel NICs.
-i|--ip <X.X.X.X> or DHCP  The IP address for this VMkernel NIC.
                           Setting an IP address requires that the
                           --netmask option be given in same command.
                           Setting this to DHCP requires DHCP support
                           in the VMkernel
-n|--netmask <X.X.X.X>     The IP netmask for this VMkernel NIC.
                           Setting the IP netmask requires that the --ip
                           option be given in the same command.
-P|--peerdns               Set peer dns. If set the system
                           will use the HostName, HostIPAddress
                           Domain returned by DHCP. Valid only for DHCP
-t|--tso                   Disable TSO for the vmknic being created.
-m|--mtu MTU               MTU for the interface being created.
-r|--restore               Restore VMkernel TCP/IP interfaces from
                           Configuration file (FOR INTERNAL USE ONLY).
-h|--help                  Show this message.


Expert Comment

ID: 24484104

What distribution and kernel version of Linux are you using? Ifconfig is a standard command included in linux. What is the syntax of the 'find' command you are using? In order to create an updated database of the search indexes for locating files you need to run 'updatedb' command. After it is finished, try locating the ifconfig again.
 - try locating ifconfig as root
 - try finding ifconfig as root

If ifconfig is indeed missing, the source package of net-tools (could be called diffferently depending on the distribution) could be installed or compiled.

If all above fails, you can manually edit configuration files:

cd /etc/sysconfig/network-scripts
cat ifcfg-eth0

Static configuration example:
# File: ifcfg-eth0
# The following settings are optional


DHCP Configuration Example:

# File: ifcfg-eth0

If you have any further questions on editing configuration files, refer to: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch03_:_Linux_Networking

Let me know if you are still having problems. Good luck!

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.


Expert Comment

ID: 24484151

You do not have to be root to run the command, it should be located in /sbin thus a user can simply run /sbin/ifconfig. The reason why you are switching to the root used is because /sbin is now in your default $PATH and now you can omit /sbin and simply use the command name to run it. You can configure your PATH by editing a configuration fie in your home directory or running a command to add /sbin to the default PATH, but that's info for a different post.

Expert Comment

ID: 24484195
Hi there,

By default the service console is on the vswif0 interface.

Run the following command to change its IP:
  esxcfg-vswif -i <new IP> -n <new netmask> vswif0
new IP = your new IP address (eg:
new netmask = your new netmask (eg:

If you need to change the default gateway, edit the /etc/sysconfig/network file directly:
  vim /etc/sysconfig/network
You'll see the value that you need to update once you open the file, it is called GATEWAY.

I hope that helped,

LVL 21

Expert Comment

ID: 24484217
In ESX, you don't use ifconfig to configure networking.
You would use these commands
esxcfg-vswif and

Accepted Solution

DetersLaw earned 0 total points
ID: 24486702
I have learned that physical adapters servicing a virtual machine port group don't need IP addresses assigned (Service Console and VMKernel port groups have IP addresses assigned).

Thanks all!

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Ransomware is a malware that is again in the list of security  concerns. Not only for companies, but also for Government security and  even at personal use. IT departments should be aware and have the right  knowledge to how to fight it.
This article explains how to use the rsync command to create backups and sync data across hosts. Rsync is a very useful command that is often used to copy data, make backups, migrate hosts, and bridge the gap between site staging and production envi…
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question