linux get hostname from ip local network code example Example: how to get hostname on linux $ hostnamectl