Basic Linux Commands ESXI
Basic Linux Commands ESXI
Introduction
If you are using the full version of VMware ESX you have the option to manage it, from the
command line, using the service console operating system (called the COS). The service console, in
VMware ESX, is really a modified version of Red Hat Enterprise Linux. Thus, basic Linux
administration knowledge is very valuable when you go to manage VMware ESX from the command
line.
On the other hand, if you are using VMware ESXi you likely do not access any CLI console from the
server. Two command line options for managing ESXi from the command line are-
1. The hidden ESXi service console – for information on this tiny Linux console, with very
limited features, and how to access it see my article How to access the VMware ESXi Hidden
Console.
2. The VMware remote command line interface (RCLI) – for information on RCLI, see my
article; Using VMware’s remote command line interface (RCLI) with VMware ESXi.
Now, here are my 10 basics of Linux administration that apply to managing VMware ESX:
https://techgenix.com/10-basics-linux-apply-managing-vmware-esx-through-service-console/ 1/11
5/5/23, 7:34 PM 10 Basics of Linux that apply to managing VMware ESX through the service console
ls – to list out files in a directory, just like the DOS dir command. Although, the DOS dir
command actually does work in ESX as well. I prefer the long format of the ls command, ls -l
•
cd – change directory
•
rm – to remove files
•
cp – to copy files
•
rename – to rename files
•
pwd – to show the current directory
https://techgenix.com/10-basics-linux-apply-managing-vmware-esx-through-service-console/ 2/11
5/5/23, 7:34 PM 10 Basics of Linux that apply to managing VMware ESX through the service console
One of the best Linux commands I ever learned was the command that allows me to find a file
anywhere on a filesystem-
Yes, this works great in ESX and it allows me to find the location of log files or executables when
they are not in my path or I forget where they are stored. Here is an example of how I used this to
find the location of the esxcfg-firewall command:
You should know that access to the ESX service console is not allowed, via SSH, for root, by default.
To enable it, you need to go to the server’s console, edit /etc/ssh/sshd_config, set PermitRootLogin
to yes, save it, and restart the ssh dameon with service sshd restart.
You could edit the /etc/passwd file, sure, but you should, instead, use useradd to add local users
from the command line (but this is also easily done in the VI client if you connect directly to an ESX
host). You can change passwords using passwd, just like in Linux.
One thing that is different is that you can set just about all of the ESX authorization settings by
using esxcfg-auth.
https://techgenix.com/10-basics-linux-apply-managing-vmware-esx-through-service-console/ 3/11
5/5/23, 7:34 PM 10 Basics of Linux that apply to managing VMware ESX through the service console
Like whiskey, vi is “an acquired taste” and takes some getting used to. If you are a Linux admin, you
already know vi. For those who don’t, I encourage you to use nano as it works much like the
Windows notepad.
Still, the concept is the same and the applications are almost identical.
•
ESX Patch Management Guide
•
My other article, Using ESXUPDATE to update VMware ESX Server
Just as in configuring Linux or even Windows from the command line, critical pieces of ESX Server
aren’t going to work without the proper network configuration. The easiest way to do that in ESX is
to use the VI client but you can do it at the command line using commands like esxcfg-nics, esxcfg-
route, esxcfg-vmknic, esxcfg-vswif.
About half of what these commands do is to edit traditional Linux text configuration files like
/etc/hosts, /etc/resolv.conf, /etc/sysconfig/network, /etc/vmware/esx.conf.
Just like any Linux host, in ESX you must have an IP address, proper subnet mask, default gateway
(if you want to get outside your subnet), DNS servers (unless you are going local), your ESX host
name must be able to be resolved as a FQDN, and you must have full network communication. That
full network communication can be tested with traditional Linux commands like ping, traceroute,
nslookup, and ifconfig
Unlike Linux, ESX has some critical processes such as vmware-watchdog, vmware-hostd,
vmklogger, and others.
https://techgenix.com/10-basics-linux-apply-managing-vmware-esx-through-service-console/ 6/11
5/5/23, 7:34 PM 10 Basics of Linux that apply to managing VMware ESX through the service console
For more information on understanding performance statistics with esxtop, see the VMware ESX
Resource Management Guide and Interpreting ESXTOP Statistics in the VMware Community.
Conclusion
Some would say “of course VMware ESX service console and Linux are the same, the ESX service
console IS LINUX”. That is not exactly true as it is a modified version of Red Hat Enterprise Linux.
Plus, what libraries and packages are loaded in it? What extra commands? What commands are
removed? There are many differences. Also, the ESX service console Is may still be based on Linux
but may be very different from other flavors of Linux like Ubuntu, Suse, or Fedora.
From this article, you learned 10 Linux system administration tasks / commands that you can
perform in VMware ESX Server and, trust me, if you are not familiar with Linux already, this basic
knowledge will be extremely helpful when you get to the ESX service console and need to, say, find
and edit a configuration file.
https://techgenix.com/10-basics-linux-apply-managing-vmware-esx-through-service-console/ 7/11