Get hostname by ip
Here the hostname is highlighted in the green color. The alias name for the hostname is highlighted in the red color. If you are connected the remote host, you can get the hostname of the remote machine by using the arp command. It will list all the hostnames with the IP address.