how to set fqdn in ubuntu 16.04 aws ec2 code example Example: set hostname on command line ec2 sudo hostnamectl set-hostname yourhostname