# List hypervisor's network interfaces
esxcli network ip interface ipv4 get

# Sample output
[root@esx76:~] esxcli network ip interface ipv4 get
Name  IPv4 Address     IPv4 Netmask   IPv4 Broadcast   Address Type  Gateway        DHCP DNS
----  ---------------  -------------  ---------------  ------------  -------------  --------
vmk0  10.10.46.101      255.255.255.0  10.10.46.255     STATIC        10.10.46.1     false

# set new ip
interface=vmk0
ipaddress=10.10.100.11
netmask=255.255.255.0
esxcli network ip interface ipv4 set -i $interface -I $ipaddress -N $netmask -t static

# Error when a non-existence interface were specified
# Error changing IPv4 configuration for the interface vmk1. Error was : Unable to complete Sysinfo operation.  Please see the VMkernel log file for more details.: Sysinfo error: Not foundSee VMkernel log for details.
# Set ESXi host name via CLI
hostname=ESX1
domain=kimconnect.com
fqdn=$hostname.$domain
esxcli system hostname set --host=$hostname
esxcli system hostname set --fqdn=$fqdn