Howto redefine the hostname on Debian/Ubuntu

Just a small procedure as a self-reminder (I seem to have to use it just seldom enough to forget it each time – thanks Marvil):

  • define the new hostname on the 127.0.0.1 localhost line (after localhost) in /etc/hosts
  • set the new name in /etc/hostname
  • issue a “hostname -F /etc/hostname
  • done
It's only fair to share...Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Tumblr
Tumblr
Email this to someone
email
Posted in:

2 Comments

  1. Heu, tu devrais aussi faire gaffe à /etc/mailname, et franchement, le nom local ne devrait presque jamais se trouver sur la ligne 127.0.0.1, à part pour les machines avec une adresse publique qui change souvent.

Leave a Reply

Your email address will not be published. Required fields are marked *