Change the hostname of a Linux machine that’s already joined to Active Directory
- First, leave the Active Directory domain:
sudo realm leave gcs.cloud
- Change the hostname using hostnamectl:
sudo hostnamectl set-hostname new-hostname.gcs.cloud
- Rejoin the Active Directory domain:
realm join gcs.cloud