linux get hostname of current machine code example Example: how to get hostname on linux $ hostnamectl