How to install the patch / update Esxi 5

This article describes how to install patches to ESXi 5.x for the host from the command line using the esxcli.
So, to install the patch from the command line (ssh) for esxi 5.x, do the following steps:
1. Download the patch from the official site.
2. Uploading Download the patch (zip file or vib) to our host Esxi.
3.Zahodim on the host machine with ssh.
4. The best way to migrate all virtual machines to another host, and the host machine to put in maintenance mode:
# Vim-cmd hostsvc / maintenance_mode_enter

5. Go to the directory where we downloaded the patch and check if there our update file:
# Cd / vmfs / volumes / Datastore / DirectoryName
# Ls

6. Now you can go to update the host or some modules and programs:
# Esxcli software vib update -d “/vmfs/volumes/datastore1/patch-directory/”

or if a patch update is on the Internet:
# Esxcli software vib update -v

or there is an update file * .vib:
# Esxcli software vib update -d /vmfs/volumes/datastore1/patch-directory/update-soft.vib

If you need not update something, and establish instead write update install.