Skip to content

Instantly share code, notes, and snippets.

@jlucasps
Last active December 21, 2015 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlucasps/6245109 to your computer and use it in GitHub Desktop.
Save jlucasps/6245109 to your computer and use it in GitHub Desktop.
Changing hostname of aws instance
# Change content of file /etc/hostname to
princessleia
# Add same hostname to /etc/hosts
127.0.0.1 localhost
127.0.0.1 princessleia
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
# reboot
$ sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment