How do I find my hostname and IP address in Linux? Answer
You can combine grep command and hostname to look at IP address from /etc/hosts file. here `hostname` will return the output of the hostname command and great will then search for that word in /etc/hostname.