Preparing Hosts File

  1. The /etc/hosts file must contain a fully qualified name of the server. You can check your fully qualified name by typing the command:

›_ Console

# hostname


  1. Change the hosts file:

›_ Console

# nano /etc/hosts


  1. Make sure that the document has a line in the following format:

<IP-address> <machine-name> <fully-qualified-machine-name>


For example:

192.168.2.2 oraclelinux19c oraclelinux19c.localdomain


  1. You can find the machine-name by checking at what follows after the @ character on the terminal. For example:

›_ Console

#root@oraclelinux19c


  1. Set or change the correct hostname (fully qualified name) in the /etc/hostname file by typing the command:

›_ Console

# nano /etc/hostname


  1. Make sure that the document has the following line (change "oraclelinux19c" with your machine name):

oraclelinux19c.localdomain


  1. You can find your IP address by using the ifconfig command.

›_ Console

# ifconfig