editHosts

Last Updated : Dec 10, 2021 |

You can add, replace, and delete the IP Address, FQDN, or hostname entries in the /etc/hosts file.

Syntax

editHosts [-A <ip> <FQDN> <hostname>] [-R <ip> <FQDN> <hostname>] [-D <ip> <FQDN> <hostname>] [-f </path/filename>] [--restoreDefault] [--verify]
-A <ip> <FQDN> <hostname>
Adds the entries.
-R <ip> <FQDN> <hostname>
Replaces the entries.
-D <ip> <FQDN> <hostname>
Deletes the entries.
-f </path/filename>
Adds the entries using a file.
You can find a sample file on System Manager at: /opt/vsp/editHostSampleInput
--restoreDefault
Restores the default values.
--verify
Verifies the entries in the /etc/hosts file.

To add the 10.13.60.21 entry:

editHosts "-A 10.13.60.21 datasmgr.smgrdev.avaya.com datasmgr"
number of argument 1==== 1 "-A 10.13.60.21 datasmgr.smgrtest.avaya.com datasmgr"========
Adding IP 10.13.60.21
Valid IPv4 address 10.13.60.21
SUCCESS: Added Entry 10.13.60.21