Created
July 18, 2019 00:51
-
-
Save Kiran01bm/d914abb7bba7daaf2dcbe41ae53ec2b1 to your computer and use it in GitHub Desktop.
Set Static hostname on EC2 RHEL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. hostname - Before change | |
2. sudo hostnamectl set-hostname --static ip-xxx-xxx-xxx-xxx.us-east-2.compute.internal | |
3. Add "preserve_hostname: true" to /etc/cloud/cloud.cfg | |
4. Reboot | |
5. hostname - After change |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment