I have several amazon ec2 instances running Linux AMIs based on fedora and even though I set the hostname using the command:
hostname example.com
whenever I have to reboot any of them this hostname gets reset to something ip***, how can I make my hostname stick and make it permanent??
Calling hostname doesn’t make the change permanent, it’s only for the current ‘boot’ session. To make it permanent, you have to change
/etc/sysconfig/network. There’s aHOSTNAMEline in there which is read by the boot scripts to set the hostname at startup.