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