get hostname ip linux code example
Example 1: how to get hostname on linux
$ hostnamectl
Example 2: find ip domain linux
$ dig +short stackoverflow.com
69.59.196.211
$ hostnamectl
$ dig +short stackoverflow.com
69.59.196.211