Here’s how to resolve host name to IP address and vice versa from Linux terminal:
1. To resolve host name to IP address, issue the following command at the Linux terminal –
host <host name>
e.g. host google.com
2. To resolve IP address to host name, issue the following command at the Linux terminal –
host <IP address>
e.g. host 4.2.2.2